code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP, DeriveDataTypeable, ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]
... | AlexanderPankiv/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | 83,185 | 0 | 18 | 23,432 | 14,671 | 7,704 | 6,967 | 938 | 9 |
--------------------------------------------------------------------------------
-- |
-- Module : Data.DotNet.TimeSpan
-- Copyright : (C) 2016 Yorick Laupa
-- License : (see the file LICENSE)
--
-- Maintainer : Yorick Laupa <yo.eight@gmail.com>
-- Stability : provisional
-- Portability : non-portable
--
-- .NET TimeSpa... | YoEight/dotnet-timespan | Data/DotNet/TimeSpan.hs | bsd-3-clause | 951 | 0 | 4 | 176 | 89 | 64 | 25 | 22 | 0 |
{-# LANGUAGE CPP,TemplateHaskell,DeriveDataTypeable #-}
module Data.Encoding.ISO885910
(ISO885910(..)) where
import Data.Array ((!),Array)
import Data.Word (Word8)
import Data.Map (Map,lookup,member)
import Data.Encoding.Base
import Prelude hiding (lookup)
import Control.OldException (throwDyn)
import Data.Typeable
... | abuiles/turbinado-blog | tmp/dependencies/encoding-0.4.1/Data/Encoding/ISO885910.hs | bsd-3-clause | 876 | 2 | 10 | 120 | 270 | 149 | 121 | 24 | 2 |
{-# LANGUAGE DataKinds #-}
module Parse.PatternTest where
import Test.Tasty
import Test.Tasty.HUnit
import qualified Parse.Pattern
import AST.V0_16
import AST.Structure
import ElmVersion
import Parse.IParser
import Reporting.Annotation (Located)
import Parse.TestHelpers
expr :: ElmVersion -> IParser (ASTNS Located... | avh4/elm-format | elm-format-lib/test/Parse/PatternTest.hs | bsd-3-clause | 6,966 | 0 | 23 | 1,583 | 3,346 | 1,696 | 1,650 | 71 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
module Main where
import Data.Monoid
import Data.String
import Prelude hiding (id)
import qualified Text.Blaze.Html5 as H
import Text.Blaze.Html5 ((!), Html)
import Text.Blaze.Html5.Attributes... | notcome/hskribo | app/Main.hs | bsd-3-clause | 2,357 | 0 | 10 | 305 | 234 | 138 | 96 | 28 | 1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
{-# LANGUAGE GADT... | rfranek/duckling | Duckling/Ordinal/GA/Rules.hs | bsd-3-clause | 4,720 | 0 | 17 | 1,227 | 1,173 | 578 | 595 | 102 | 71 |
{-|
Module : Config
Description : Server and database configurations
Copyright : (c) , Leonardo Hahn, 2016
License :
Maintainer : leo_lh324@hotmail
Stability : Experimental
Portability : POSIX
-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module Config where
import ... | leohahn/learning-with-texts-clone | src/Config.hs | bsd-3-clause | 2,268 | 0 | 9 | 626 | 492 | 277 | 215 | 53 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
module Juno.Runtime.MessageReceiver
( runMessageReceiver
, ReceiverEnv(..)
) where
import Control.Lens
import Control.Monad
import Control.Monad.Reader
import Control.Parallel.Strate... | haroldcarr/juno | src/Juno/Runtime/MessageReceiver.hs | bsd-3-clause | 4,755 | 0 | 19 | 889 | 1,567 | 796 | 771 | 95 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
module Main where
import Lib
-- import Data.Foldable
-- import System.Environment
-- import Data.Aeson
-- import Data.Time.Calendar
-- import GHC.Generics
import Network.Wai
import Network.Wai.Handler.Warp
import Servant
type S... | DNNX/shkoliner | app/Main.hs | bsd-3-clause | 665 | 0 | 8 | 105 | 152 | 88 | 64 | 20 | 1 |
module Int where
import ListMap
map :: (Int -> Int) -> Int -> Int
map f x = f x
| rodrigogribeiro/mptc | test/classless/Int.hs | bsd-3-clause | 82 | 0 | 7 | 22 | 40 | 22 | 18 | 4 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE CPP #-}
-- | Field functions allow you to easily create and validate forms, cleanly handling the uncer... | tolysz/yesod | yesod-form/Yesod/Form/Fields.hs | mit | 35,279 | 8 | 22 | 8,961 | 7,399 | 3,996 | 3,403 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Test.Pos.Cbor.Canonicity
( perturbCanonicity
) where
import Universum
import qualified Control.Monad.State as S
import GHC.Float (RealFloat (..))
import Numeric.Half (Half (..))
import Tes... | input-output-hk/pos-haskell-prototype | binary/test/Test/Pos/Cbor/Canonicity.hs | mit | 9,193 | 0 | 20 | 3,472 | 2,343 | 1,178 | 1,165 | -1 | -1 |
module Faktor.Euklid (
make_fixed
, make_quiz
) where
import Faktor.Euklid.Param
import Challenger.Partial
import Autolib.ToDoc
import Autolib.Reporter
import Autolib.Util.Zufall
import Inter.Types
import Inter.Quiz
import Data.Typeable
data Euklid = Euklid deriving ( Show, Read, Typeable )
instance O... | florianpilz/autotool | src/Faktor/Euklid.hs | gpl-2.0 | 2,778 | 0 | 13 | 919 | 1,103 | 582 | 521 | -1 | -1 |
{-# LANGUAGE CPP, DeriveDataTypeable, OverloadedStrings #-}
-- | This module re-exports the @Github.Data.Definitions@ module, adding
-- instances of @FromJSON@ to it. If you wish to use the data without the
-- instances, use the @Github.Data.Definitions@ module instead.
module Github.Data (module Github.Data.Definiti... | bitemyapp/github | Github/Data.hs | bsd-3-clause | 25,228 | 0 | 63 | 8,534 | 6,860 | 3,410 | 3,450 | 654 | 2 |
module Config (
buildTeakHome,
teakVersion
) where
buildTeakHome :: String
buildTeakHome = "/usr/local"
teakVersion :: String
teakVersion = "0.4"
| Mahdi89/eTeak | src/Config.hs | bsd-3-clause | 176 | 0 | 4 | 49 | 32 | 20 | 12 | 7 | 1 |
module ListPulls where
import qualified Github.PullRequests as Github
import Data.List
main = do
possiblePullRequests <- Github.pullRequestsFor "thoughtbot" "paperclip"
case possiblePullRequests of
(Left error) -> putStrLn $ "Error: " ++ (show error)
(Right pullRequests) ->
putStrLn $ inter... | jwiegley/github | samples/Pulls/ListPulls.hs | bsd-3-clause | 864 | 0 | 17 | 153 | 225 | 114 | 111 | 19 | 2 |
-- |
-- Module : Basement.Mappable
-- License : BSD-style
-- Maintainer : Nicolas Di Prima <nicolas@primetype.co.uk>
-- Stability : experimental
-- Portability : portable
--
-- Class of collection that can be traversed from left to right,
-- performing an action on each element.
--
module Foundation.Collect... | vincenthz/hs-foundation | foundation/Foundation/Collection/Mappable.hs | bsd-3-clause | 4,150 | 0 | 12 | 923 | 707 | 383 | 324 | 38 | 1 |
{-# LANGUAGE CPP #-}
module HPACKSpec where
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative ((<$>))
#endif
import Control.Monad (forM_, filterM)
import Data.Aeson (eitherDecode)
import qualified Data.ByteString.Lazy as BL
import Data.List (isPrefixOf, isSuffixOf)
import System.Directory (getDirectoryContents... | bergmark/http2 | test-hpack/HPACKSpec.hs | bsd-3-clause | 1,677 | 0 | 18 | 420 | 513 | 262 | 251 | 44 | 3 |
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleContexts,FlexibleInstances,
PatternGuards, RankNTypes, ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.C.Analysis.TravMonad
-- Copyright : (c) 2008 Bene... | wdanilo/haskell-language-c | src/Language/C/Analysis/TravMonad.hs | bsd-3-clause | 19,594 | 0 | 16 | 4,636 | 5,375 | 2,780 | 2,595 | 311 | 7 |
--
-- Copyright (c) 2011 Citrix Systems, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This progra... | crogers1/manager | upgrade-db/Setup.hs | gpl-2.0 | 815 | 0 | 4 | 148 | 28 | 23 | 5 | 2 | 1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="el-GR">
<title>Report Generation</title>
<maps>
<homeID>reports</homeID>
<mapref locati... | thc202/zap-extensions | addOns/reports/src/main/javahelp/org/zaproxy/addon/reports/resources/help_el_GR/helpset_el_GR.hs | apache-2.0 | 966 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
module Bug where
newtype ContT r m a = ContT { runContT :: (a -> m r) -> m r }
foo bar baz = (`runContT` bar.baz)
| ezyang/ghc | testsuite/tests/rename/should_compile/T13132.hs | bsd-3-clause | 116 | 0 | 10 | 29 | 55 | 34 | 21 | 3 | 1 |
-- Applicative parser for infix arithmetic expressions without any
-- dependency on hackage. Builds an explicit representation of the
-- syntax tree to fold over using client-supplied semantics.
module Parser (parseExp) where
import Control.Applicative hiding (Const)
import Control.Arrow
import Data.Char
import Data.Mo... | danielgrigg/haskell-cis194 | week5/Parser.hs | bsd-2-clause | 3,743 | 0 | 15 | 977 | 1,141 | 596 | 545 | 65 | 3 |
module Main where
import CommandLine
import Control.Monad
import Data.Char
import Expense
import Parser
import PetParser
import System.Environment
import System.Exit
import System.IO
main :: IO ()
main = do opts <- getArgs >>= parseCmdLine
logF opts LogInfo "Parsed command-line arguments"
contents... | fredmorcos/attic | projects/pet/archive/pet_haskell_simpleparse/Main.hs | isc | 1,871 | 0 | 16 | 589 | 734 | 374 | 360 | 45 | 6 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE BangPatterns #-}
... | carlohamalainen/glacier-push | src/Push.hs | mit | 13,429 | 0 | 24 | 4,230 | 3,152 | 1,613 | 1,539 | 282 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TemplateHaskell #-}
module SoOSiM.Components.ProcManager.Types where
import Control.Lens
import SoOSiM
import SoOSiM.Components.Common
import SoOSiM.Components.SoOSApplicationGraph
data PM_State
= PM_State
{ _thread_graph :: ApplicationGraph
, _rm :... | christiaanb/SoOSiM-components | src/SoOSiM/Components/ProcManager/Types.hs | mit | 650 | 0 | 8 | 117 | 153 | 89 | 64 | 22 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE FlexibleInstances #-}
import Network.Wai
import Network.Wai.Handler.Warp
import Servant
import Paths_DailyFeeling_backend
import Dail... | Denommus/DailyFeeling | Backend/Main.hs | mit | 1,951 | 0 | 15 | 377 | 538 | 276 | 262 | 55 | 1 |
import qualified Data.Map as M
type TermSet = M.Map String String
addTerminals :: [String] -> TermSet
addTerminals = foldl' addTerminal M.empty
addTerminal :: TermSet -> String -> TermSet
addTerminal ts term = tryStr 1 base
where base = fmtLiteralName term
try :: Int -> TermSet
try k = tryStr k (b... | trbauer/ebnf | LexicalAnalysis.hs | mit | 1,763 | 54 | 8 | 314 | 519 | 264 | 255 | 55 | 1 |
module Oinc.Types (
Connection
) where
import Database.PostgreSQL.Simple
| DeTeam/bitoinc-haskell-server | src/Oinc/Types.hs | mit | 80 | 0 | 4 | 15 | 17 | 11 | 6 | 3 | 0 |
module Problem48 where
main = print $ reverse . take 10 . reverse . show $ sum [n^n | n <- [1..1000]]
| DevJac/haskell-project-euler | src/Problem48.hs | mit | 104 | 0 | 10 | 24 | 55 | 29 | 26 | 2 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE OverloadedStrings #-}
module Unison.HashQualified' where
import Unison.Prelude
import qualified Data.Text as Text
import Prelude hiding ( take )
import Unison.Name ( ... | unisonweb/platform | unison-core/src/Unison/HashQualified'.hs | mit | 5,084 | 0 | 12 | 1,129 | 1,546 | 784 | 762 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeApplications #-}
{-|
Description : Allowed effects for interacting with Nar files.
Maintainer : Shea Levy <shea@s... | shlevy/hnix-store | hnix-store-core/src/System/Nix/Nar.hs | mit | 9,184 | 0 | 22 | 2,819 | 2,299 | 1,206 | 1,093 | 190 | 4 |
-- | This module is a linter for the input and output of our programs. This
-- means it checks properties that, if they fail, are a bug somewhere in the
-- program.
--
-- It should not be possible to trigger the linter via the usual interface (but
-- easily so via the debugging interface).
--
-- The existence of this m... | nomeata/incredible | logic/Lint.hs | mit | 4,242 | 0 | 15 | 1,164 | 1,276 | 651 | 625 | 71 | 5 |
-- Trim a String
-- http://www.codewars.com/kata/526e8de0512511429e000006/
module Trim where
import Data.Char (isSpace)
trim :: String -> String
trim = reverse . dropWhile isSpace . reverse . dropWhile isSpace
| gafiatulin/codewars | src/6 kyu/Trim.hs | mit | 213 | 0 | 8 | 31 | 48 | 27 | 21 | 4 | 1 |
{- ----------------------------------------------------------------------- -}
{- * Output for substitution -}
{- | Generates text for the @subst@ functions. -}
processSubst :: ASTAnalysis -> [NtRoot] -> M String
processSubst aaa nt1s =
do { ss <- processNt1Nt2Mv2 aaa nt1s f
; return $ concat $ map join ss
... | plclub/lngen | src/Attic/OutputDefinitions.hs | mit | 9,399 | 0 | 15 | 4,185 | 2,595 | 1,277 | 1,318 | 172 | 5 |
{-# LANGUAGE TupleSections, OverloadedStrings #-}
module Handler.Search where
import Yesod.Markdown
import Data.Maybe
import Database.Persist.MongoDB
import qualified Data.Map as M
import qualified Data.Text as T
import Text.Parsec
import Import
import qualified Barch.QueryParser as Q
import Barch.Widgets
-- | take ... | klarh/barch | Handler/Search.hs | mit | 3,245 | 0 | 14 | 785 | 989 | 506 | 483 | 73 | 4 |
module Grammar.Greek.Morph.ShouldElide.Stage where
import Prelude hiding (Word)
import Control.Lens (over, _1, _2)
import Data.Either.Validation
import Grammar.Common
import qualified Grammar.Greek.Morph.ShouldElide.Round as Round
import Grammar.Greek.Morph.ShouldElide.Types
import Grammar.Greek.Morph.Types
import Gra... | ancientlanguage/haskell-analysis | greek-morph/src/Grammar/Greek/Morph/ShouldElide/Stage.hs | mit | 2,472 | 0 | 18 | 474 | 946 | 515 | 431 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
module Presenters.UniqueTask
( UniqueTask(..)
, fromModel
) where
import Data.Aeson.TH
import qualified Data.Text as T
import qualified Models.UniqueTask as M
import Presenters.JSONOptions
data UniqueTask = UniqueTask
{ taskId :: Int
, d... | ostapneko/stld2 | src/main/Presenters/UniqueTask.hs | mit | 661 | 0 | 9 | 199 | 149 | 90 | 59 | 19 | 1 |
-- Define a class of mathematical rings
-- See also http://en.wikipedia.org/wiki/Ring_(mathematics)
module Week5.Ring where
-- You can optionally include a list of symbols after an import statement
-- to say exactly what you're importing from the other module. This is sometimes
-- useful for documentation, and to ... | rglew/cis194 | src/Week5/Ring.hs | mit | 3,134 | 0 | 11 | 800 | 1,033 | 530 | 503 | 66 | 3 |
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.Char8 as BL8 (putStrLn)
import Data.List (sortBy, intersect)
import Data.Function (on)
import Crypto.Common (genCandidates)
import System.Environment (getArgs)
import Text.Printf (printf)
... | ckw/matasano | set1/challenge4.hs | mit | 1,219 | 0 | 16 | 291 | 312 | 168 | 144 | 17 | 2 |
-- #hide
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.UI.GLUT.QueryUtils
-- Copyright : (c) Sven Panne 2002-2005
-- License : BSD-style (see the file libraries/GLUT/LICENSE)
--
-- Maintainer : sven.panne@aedion.de
-- Stability : stable
-- ... | ducis/haAni | hs/common/Graphics/UI/GLUT/QueryUtils.hs | gpl-2.0 | 1,082 | 0 | 7 | 169 | 164 | 101 | 63 | 13 | 1 |
module Cryptography.SystemAlgebra.SecureChannels.Terms where
import Notes
makeDefs
[ "communication channel"
, "communication channel without deletion"
, "communication channel with deletion"
, "channel"
, "channel without deletion"
, "channel with deletion"
, "authenticated chan... | NorfairKing/the-notes | src/Cryptography/SystemAlgebra/SecureChannels/Terms.hs | gpl-2.0 | 674 | 0 | 6 | 161 | 68 | 44 | 24 | -1 | -1 |
module Screen (Pos,cls,goto,beep,writeAt) where
type Pos = (Int,Int)
-- clear the text screen
cls :: IO()
cls = putStr "\ESC[2J"
-- make a beep
beep :: IO()
beep = putStr "\BEL"
-- move the cursor at the new pos (x,y)
goto :: Pos -> IO()
goto (x,y) =
putStr("\ESC["++show y++";"++show x++"H")
-- write at the curs... | Proch92/pap | Screen.hs | gpl-2.0 | 397 | 4 | 11 | 87 | 171 | 92 | 79 | 11 | 1 |
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad
import qualified Data.ByteString.Char8 as C8
import Data.List
import System.ZMQ4.Monadic
import Text.Printf
average :: [Double] -> Double
average = (/) <$> sum <*> genericLength
main :: IO ()
main =
run... | KenetJervet/mapensee | haskell/zmq/WeatherBroadcastClient.hs | gpl-3.0 | 925 | 0 | 17 | 216 | 269 | 134 | 135 | 27 | 1 |
module Utils where
import Control.Monad.Random
rngSplits :: RandomGen g => g -> Int -> [g] -> ([g], g)
rngSplits g 0 acc = (acc, g)
rngSplits g n acc = rngSplits g'' (n - 1) (g' : acc)
where
(g', g'') = split g
| thalerjonathan/phd | coding/prototyping/haskell/propertyBasedSIR/src/Utils.hs | gpl-3.0 | 219 | 0 | 10 | 52 | 114 | 63 | 51 | 6 | 1 |
main :: IO()
main = do
s <- getLine
putStrLn (show (mod (sum [read [c]::Int | c<-s ]) 9 == 0))
| TomiBelan/ksp-vimim | testovac/task_data/mod9/solution.hs | gpl-3.0 | 97 | 0 | 17 | 23 | 73 | 36 | 37 | 4 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- |
-- Module : Network.Google.AlertCenter
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla ... | brendanhay/gogol | gogol-alertcenter/gen/Network/Google/AlertCenter.hs | mpl-2.0 | 11,099 | 0 | 14 | 2,639 | 1,240 | 881 | 359 | 319 | 0 |
module ListFunctions where
main = do
putStrLn "prefix : sampleText"
putStrLn (prefix : sampleText)
putStrLn "head sampleText"
putStrLn ((head sampleText) : "")
putStrLn "tail sampleText"
putStrLn (tail sampleText)
putStrLn "take 1 sampleText"
putStrLn (take 1 sampleText)
putStrL... | ocozalp/Haskellbook | chapter3/listfunctions.hs | unlicense | 657 | 0 | 11 | 170 | 187 | 82 | 105 | 20 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
----------------------------------------------------------------------------
-- |
-- Module : Web.Skroutz.Model.ResultWrappers.Sku
-- Copyright : (c) 2016 Remous-Aris ... | ariskou/skroutz-haskell-api | src/Web/Skroutz/Model/ResultWrappers/Sku.hs | apache-2.0 | 1,506 | 0 | 9 | 314 | 200 | 122 | 78 | 20 | 0 |
module Tiling.A320097 where
import Helpers.LeafFreeGrids (leafFreeGridsList)
a320097_list :: [Integer]
a320097_list = leafFreeGridsList 4
a320097 :: Int -> Integer
a320097 n = a320097_list !! (n - 1)
| peterokagey/haskellOEIS | src/Tiling/A320097.hs | apache-2.0 | 202 | 0 | 7 | 28 | 60 | 34 | 26 | 6 | 1 |
module Proble010 where
main =
print $ sum $ takeWhile (< 2000000) $ primes
primes = 2 : 3 : filter (f primes) [5, 7 ..]
where f (p:ps) n = p * p > n || n `rem` p /= 0 && f ps n
| vasily-kartashov/playground | euler/problem-010.hs | apache-2.0 | 185 | 0 | 12 | 54 | 109 | 59 | 50 | 5 | 1 |
--
-- Copyright 2014, NICTA
--
-- This software may be distributed and modified according to the terms of
-- the BSD 2-Clause license. Note that NO WARRANTY is provided.
-- See "LICENSE_BSD2.txt" for details.
--
-- @TAG(NICTA_BSD)
--
{-# LANGUAGE CPP #-}
module CapDL.State where
import CapDL.Model
import Control.Mo... | smaccm/capDL-tool | CapDL/State.hs | bsd-2-clause | 17,880 | 0 | 15 | 4,149 | 7,208 | 3,613 | 3,595 | 431 | 5 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Game.GameBase where
import Control.Lens (use, (^.), (.=), Traversal', preuse, zoom, ix, (&), (.~))
import Control.Monad (when, liftM, void, unless)
import Data.Bits ((.&.), (.|.))
impo... | ksaveljev/hake-2 | src/Game/GameBase.hs | bsd-3-clause | 15,746 | 4 | 30 | 4,474 | 4,497 | 2,279 | 2,218 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, OverloadedStrings, TypeFamilies #-}
module Aws.SimpleDb.Response
where
import Aws.Response
import Aws.SimpleDb.Error
import Aws.SimpleDb.Metadata
import Aws.Xml
import Data.IORef
import ... | jgm/aws | Aws/SimpleDb/Response.hs | bsd-3-clause | 2,528 | 0 | 16 | 775 | 647 | 331 | 316 | 44 | 4 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -Wall #-}
module Language.Lens.Tag (
Component
, IsTag (..)
, deriveTags
) where
import Control.Arrow (first)
import Data.Char (toUpper)
import GHC.Generics
import Language.Haskell.TH
import Data.Beamable
import Language.Lens.Naming
t... | JohnLato/lifted-lens | src/Language/Lens/Tag.hs | bsd-3-clause | 4,653 | 0 | 20 | 1,518 | 1,428 | 731 | 697 | 86 | 8 |
{-# OPTIONS_GHC -Wall #-}
{-# OPTIONS_GHC -Wno-missing-signatures #-}
{-# OPTIONS_GHC -fwarn-incomplete-uni-patterns #-}
module Day24 where
import Test.Hspec
import qualified Data.Map as Map
import Data.Map (Map)
import qualified Data.Set as Set
import Data.Set (Set)
import Control.Monad (guard)
import Data.List
im... | guibou/AdventOfCode2016 | src/Day24.hs | bsd-3-clause | 3,110 | 0 | 15 | 998 | 1,009 | 546 | 463 | 70 | 3 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
module Test.IO.Tinfoil.KDF.Scrypt.Compat where
import Disorder.Core.IO (testIO)
import P
import System.IO
import Tinfoil.Data
import ... | ambiata/tinfoil | test/Test/IO/Tinfoil/KDF/Scrypt/Compat.hs | bsd-3-clause | 890 | 0 | 11 | 174 | 157 | 88 | 69 | 21 | 1 |
import XMonad
-- for xmobar
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import System.IO (hPutStrLn)
import XMonad.Util.Run (spawnPipe)
-- for various things
import Data.List (sort, foldl')
import qualified Data.Map as M
import qualified XMonad.StackSet as W
-- for dynamic workspaces
import XMonad... | matcatc/xmonad-config | xmonad.hs | bsd-3-clause | 20,181 | 233 | 15 | 3,994 | 2,597 | 1,597 | 1,000 | 179 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : Network.HaskellNet.Stream
-- Copyright : (c) Jun Mukai 2006
-- License : BSD
--
-- Maintainer : mukai@jmuk.org
-- Stability : experimental
-- Portability : portable
--
-- A library for abstracting sockets ... | d3zd3z/HaskellNet-old | Network/HaskellNet/BSStream.hs | bsd-3-clause | 1,632 | 0 | 10 | 388 | 471 | 251 | 220 | 37 | 1 |
{-# LANGUAGE CPP #-}
-- | Handy functions for creating much Core syntax
module MkCore (
-- * Constructing normal syntax
mkCoreLet, mkCoreLets,
mkCoreApp, mkCoreApps, mkCoreConApps,
mkCoreLams, mkWildCase, mkIfThenElse,
mkWildValBinder, mkWildEvBinder,
sortQuantVars, cast... | sgillespie/ghc | compiler/coreSyn/MkCore.hs | bsd-3-clause | 31,031 | 0 | 15 | 8,364 | 4,517 | 2,467 | 2,050 | 347 | 3 |
module Main where
import ChatData
import Control.Distributed.STM.DebugDSTM
import Control.Distributed.STM.DSTM
import Control.Exception as CE
main :: IO ()
main = startDist $ do
inVar <- atomic $ newTVar Nothing
registerTVar "localhost" inVar "Chat"
chatServer inVar []
chatServer :: CmdTVar -> [(String, CmdTVa... | proger/haskell-dstm | Chat/ChatServer.hs | bsd-3-clause | 1,502 | 7 | 15 | 472 | 506 | 258 | 248 | 41 | 4 |
module P16 (
p16 ) where
powerTwo :: Integer -> Integer
powerTwo x = 2 ^ x
splitNum :: Integer -> [Integer]
splitNum 0 = []
splitNum x = x `mod` 10 : splitNum (x `div` 10)
p16 :: Integer
p16 = sum . splitNum . powerTwo $ 1000
| pyuk/euler2 | src/P16.hs | bsd-3-clause | 231 | 0 | 8 | 54 | 104 | 58 | 46 | 9 | 1 |
-- Kval15, Uppg. 2: Tabbtabbande
import Lib
testcases :: [((Int, [Int]), Int)]
testcases = [ ((5, [2, 5, 4]), 4)
, ((9, [5, 9, 4, 9, 8]), 17)
]
-- | Beräkna kortaste avståndet mellan i och j "modulo n". Exempel: t 5 (1, 2) == 1 == t 5 (1, 5)
tabbavstånd :: Int -> (Int, Int) -> Int
tabba... | patrikja/progolymp | skolkval/2015/Uppgift2.hs | bsd-3-clause | 904 | 4 | 11 | 287 | 325 | 183 | 142 | 18 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE MultiWayIf #-}
module TwinkleBear.Lesson04a (main) where
import Prelude hiding (init)
import Control.Applicative
import Control.Monad
import Data.Foldable
import Data.Monoid
import Foreign.C.Types
import Linea... | svenkeidel/sdl2 | examples/twinklebear/Lesson04a.hs | bsd-3-clause | 3,062 | 12 | 29 | 948 | 909 | 465 | 444 | 71 | 10 |
{-
If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120.
{20,48,52}, {24,45,51}, {30,40,50}
For which value of p ≤ 1000 is the number of solutions maximised?
-}
import qualified Data.Ord as Ord
import qualified Data.List as List
solutions... | bgwines/project-euler | src/solved/problem39.hs | bsd-3-clause | 681 | 2 | 12 | 133 | 225 | 126 | 99 | 14 | 1 |
{-# LANGUAGE TypeOperators, DataKinds, TemplateHaskell #-}
module Cloud.Azure.Storage.Table
( runStorageTable
, tables
, TableName(..)
) where
import Data.Aeson (FromJSON, Result(Success, Error))
import qualified Data.Aeson as Aeson
import Data.Aeson.TH (deriveFromJSON, defaultOptions)
import Data.Byt... | yunomu/azure-storage-table | Cloud/Azure/Storage/Table.hs | bsd-3-clause | 1,879 | 0 | 19 | 472 | 529 | 295 | 234 | 52 | 1 |
{-# LANGUAGE LambdaCase #-}
module Main where
import KOSC.Compiler
import Data.Foldable
import Data.Semigroup ((<>))
import Options.Applicative
import System.IO
import qualified Data.Text.Lazy.IO as L
import qualified Text.PrettyPrint.ANSI.Leijen as PP
... | fatho/kos-c | app/Main.hs | bsd-3-clause | 1,653 | 0 | 15 | 392 | 438 | 223 | 215 | 32 | 3 |
{-# LANGUAGE BangPatterns, UnboxedTuples, MagicHash, NamedFieldPuns, RecordWildCards, FlexibleInstances, MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
module Data.TrieMap.WordMap.Buildable (WordStack) where
import Data.TrieMap.TrieKey
import Data.Word
import Data.TrieMap.WordMap.Base
import Data.TrieMap.Wo... | lowasser/TrieMap | Data/TrieMap/WordMap/Buildable.hs | bsd-3-clause | 1,827 | 10 | 12 | 421 | 708 | 363 | 345 | 48 | 3 |
-- (c) The University of Glasgow 2006
{-# LANGUAGE CPP, FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-} -- instance MonadThings is necessarily an
-- orphan
module TcEnv(
TyThing(..), TcTyThing(..), TcId,
-- Instance environment, and InstInfo type
... | tjakway/ghcjvm | compiler/typecheck/TcEnv.hs | bsd-3-clause | 40,310 | 7 | 19 | 11,538 | 6,793 | 3,581 | 3,212 | -1 | -1 |
-- | This program checks every file/dir in $HOME against
-- a list of know programs/packages to determine whether
-- we have any program installed that may need it.
import Control.Monad.IfElse
import Data.List
import qualified Data.Map as M
import System.Directory
import ... | ivanperez-keera/clean-home | src/Main.hs | bsd-3-clause | 2,323 | 0 | 12 | 560 | 618 | 322 | 296 | 44 | 3 |
{-
Module : System.ByteOrder
Copyright : (c) Antoine Latter 2009
License : BSD3
Maintainer : Antoine Latter <aslatter@gmail.com>
-}
{-# OPTIONS_GHC -fno-cse #-}
module System.ByteOrder(byteOrder, ByteOrder(..)) where
import Foreign.Marshal.Alloc (alloca)
import Foreign.Marshal.Array (peekArray)
import Foreign.Ptr... | aslatter/byteorder | System/ByteOrder.hs | bsd-3-clause | 1,579 | 0 | 12 | 265 | 373 | 223 | 150 | 29 | 1 |
module Main where
import Control.Monad
import Data.ROS.Message
import Data.ROS.Service
import Data.ROS.PrimitiveType
import Data.ROS.Formattable
arg = Message "arg" [ ("foo", Int32)
, ("bar", String) ]
rtv = Message "rtv" [ ("baz", Bool) ]
srv = Service "srv" arg rtv
main :: IO ()
main = putSt... | ROSVendor/msg_dbg | demo/format/service.hs | bsd-3-clause | 340 | 0 | 7 | 76 | 115 | 68 | 47 | 12 | 1 |
module Main where
import qualified System.Environment as Env
import Foreign.Ptr
import LLVM.General.AST
import LLVM.General.Module
import LLVM.General.Context
import LLVM.General.ExecutionEngine
import Control.Monad.Error
foreign import ccall "dynamic" haskFun :: FunPtr (IO ()) -> (IO ())
run :: FunPtr a -> IO ()... | ademinn/JavaWithClasses | src/Runner.hs | bsd-3-clause | 1,591 | 0 | 25 | 448 | 573 | 287 | 286 | 41 | 2 |
{-# LANGUAGE MultiParamTypeClasses,
FlexibleInstances,
UndecidableInstances,
Rank2Types,
FlexibleContexts,
TypeFamilies,
DeriveDataTypeable
#-}
module Lcars.DHT.Types ( DHT(..), LcarsDHTHash(..), LcarsDHT(..), DhtFunctorCtx(..)
... | alios/lcars | Lcars/DHT/Types.hs | bsd-3-clause | 6,139 | 0 | 16 | 1,768 | 2,098 | 1,077 | 1,021 | 178 | 2 |
module Paths_golf (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
import Prelude
catchIO :: IO a -> (Exception.IOException -> IO a) -> I... | richard12511/potential-golf-waffle | .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen/Paths_golf.hs | bsd-3-clause | 1,722 | 0 | 10 | 177 | 362 | 206 | 156 | 28 | 1 |
{-# LANGUAGE PolymorphicComponents, RecordWildCards, ScopedTypeVariables, TemplateHaskell, FlexibleContexts, NoMonomorphismRestriction, ConstraintKinds #-}
module Synthesis.TermiteGame (
Config(..),
Abstractor(..),
absRefineLoop,
RefineStatic(..),
RefineDynamic(..),
RefineInfo(..),
cex,
... | termite2/synthesis | Synthesis/TermiteGame.hs | bsd-3-clause | 55,406 | 576 | 27 | 18,762 | 17,512 | 8,713 | 8,799 | 983 | 4 |
--
--
--
-----------------
-- Exercise 6.16.
-----------------
--
--
--
module E'6'16 where
import Pictures
(
Picture
, beside
, above
)
import Test.QuickCheck
propAboveBeside3Correct :: Picture -> Picture -> Bool
propAboveBeside3Correct n s
= (n `beside` n) `above` (s `beside` s)
== (n `ab... | pascal-knodel/haskell-craft | _/links/E'6'16.hs | mit | 403 | 0 | 9 | 92 | 108 | 71 | 37 | 11 | 1 |
module Graph.Way.Plain where
-- $Id$
import Graph.Util
import Graph.Way.Input ( Input , matrix , solvability , ex
, Solvability ( Solvable , Unsolvable )
)
import Autolib.Dot ( peng, Layout_Program (..) )
import Autolib.Graph.Adj ( schoen , warshall )
import Inter.Types ( Make , direct , Scori... | florianpilz/autotool | src/Graph/Way/Plain.hs | gpl-2.0 | 2,547 | 26 | 19 | 742 | 790 | 417 | 373 | -1 | -1 |
module Data.Time.Format
(
-- * UNIX-style formatting
NumericPadOption,FormatTime(..),formatTime,
module Data.Time.Format.Parse
) where
import Data.Time.Format.Parse
import Data.Time.LocalTime
import Data.Time.Calendar.WeekDate
import Data.Time.Calendar.OrdinalDate
import Data.Time.Calendar
import Data.Time.Calend... | jwiegley/ghc-release | libraries/time/Data/Time/Format.hs | gpl-3.0 | 10,783 | 43 | 18 | 1,944 | 2,674 | 1,613 | 1,061 | 98 | 2 |
module B1.Program.Chart.Animation
( Animation
, animateOnce
, current
, next
, incomingScaleAnimation
, incomingAlphaAnimation
, outgoingScaleAnimation
, outgoingAlphaAnimation
) where
import Graphics.Rendering.OpenGL
import B1.Data.Range
import B1.Program.Chart.Dirty
type Animation a = [a]
curr... | madjestic/b1 | src/B1/Program/Chart/Animation.hs | bsd-3-clause | 1,172 | 0 | 10 | 189 | 351 | 191 | 160 | 31 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
module Stack.PrettyPrint
(
-- * Pretty printing functions
displayPlain, displayAnsiIfPossible
-- * Logging based on pretty-print typeclass
, prettyDebug,... | AndrewRademacher/stack | src/Stack/PrettyPrint.hs | bsd-3-clause | 3,110 | 0 | 9 | 649 | 650 | 384 | 266 | 72 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RecordWildCards #-}
module Distribution.Client.GlobalFlags (
GlobalFlags(..)
, defaultGlobalFlags
, RepoContext(..)
, withRepoCo... | tolysz/prepare-ghcjs | spec-lts8/cabal/cabal-install/Distribution/Client/GlobalFlags.hs | bsd-3-clause | 10,547 | 0 | 17 | 2,976 | 1,941 | 1,077 | 864 | 197 | 4 |
{-# LANGUAGE CPP #-}
-- Vectorise a modules type and class declarations.
--
-- This produces new type constructors and family instances top be included in the module toplevel
-- as well as bindings for worker functions, dfuns, and the like.
module Vectorise.Type.Env (
vectTypeEnv,
) where
#include "HsVersions.h"
... | olsner/ghc | compiler/vectorise/Vectorise/Type/Env.hs | bsd-3-clause | 22,685 | 0 | 19 | 6,860 | 2,674 | 1,440 | 1,234 | 211 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Template... | anton-dessiatov/stack | src/Stack/Types/Build.hs | bsd-3-clause | 27,940 | 0 | 23 | 8,144 | 5,203 | 2,826 | 2,377 | 596 | 6 |
{- INLINE[~k] f -} | mpickering/hlint-refactor | tests/examples/Comment3.hs | bsd-3-clause | 18 | 0 | 2 | 3 | 3 | 2 | 1 | 1 | 0 |
{-# LANGUAGE Rank2Types #-}
-- | Internal types to the library.
module Stack.Types.Internal
( Env (..)
, HasTerminal (..)
, HasReExec (..)
, Sticky (..)
, HasSticky (..)
, LogOptions (..)
, HasLogOptions (..)
, view
) where
import Control.Concurrent.MVar
import Control.Monad.Logge... | mrkkrp/stack | src/Stack/Types/Internal.hs | bsd-3-clause | 2,128 | 0 | 11 | 440 | 659 | 368 | 291 | 68 | 1 |
module GuardsIn2 where
merge :: (a -> a -> Ordering) -> [a] -> [a] -> [a]
merge cmp xs [] = xs
merge cmp [] ys = ys
merge cmp (x:xs) (y:ys)
= case x `cmp` y of
GT -> y : merge cmp (x:xs) ys
_ -> x : merge cmp xs (y:ys)
{- mergeIt xs ys = merge compare xs ys -}
mergeIt :: (a -> a -> Orderin... | SAdams601/HaRe | old/testing/generativeFold/GuardsIn2.hs | bsd-3-clause | 648 | 0 | 11 | 191 | 318 | 168 | 150 | 15 | 2 |
{-# OPTIONS -fglasgow-exts #-}
module API where
import Data.Dynamic
data Null = Null { a, b :: Int }
deriving (Typeable, Show)
null :: Null
null = Null { a = 42 , b = 1 }
| abuiles/turbinado-blog | tmp/dependencies/hs-plugins-1.3.1/testsuite/unloadAll/null/api/API.hs | bsd-3-clause | 179 | 0 | 8 | 45 | 62 | 39 | 23 | 7 | 1 |
-- !!! Correct abstract tycon import
module M where
import Prelude(Either)
| urbanslug/ghc | testsuite/tests/module/mod86.hs | bsd-3-clause | 76 | 0 | 5 | 12 | 13 | 9 | 4 | 2 | 0 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
import Control.Concurrent (forkIO, killThread, threadDelay)
import Control.Concurrent.MVar (MVar, modifyMVarMasked_, newMVar,
readMVar, takeMVar)
import Control.Mona... | positiondev/periodic | test/Spec.hs | isc | 5,424 | 0 | 21 | 2,038 | 1,623 | 773 | 850 | 105 | 1 |
module GHCJS.DOM.DOMParser (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/DOMParser.hs | mit | 39 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE... | alanz/haskell-lsp | lsp-types/src/Language/LSP/Types/Message.hs | mit | 17,976 | 3 | 16 | 4,068 | 3,206 | 1,724 | 1,482 | -1 | -1 |
-- file ch03/ex09.hs
data Turn = LeftTurn | RightTurn | Straight deriving (Show) | imrehg/rwhaskell | ch03/ex09.hs | mit | 80 | 0 | 6 | 12 | 22 | 13 | 9 | 1 | 0 |
module Web.App.StreamSpec where
import SpecHelper
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "Web.App.Stream" $ do
context "general" $ do
it "tests" $ do
0 `shouldBe` 0 | fhsjaagshs/webapp | test/Web/App/StreamSpec.hs | mit | 212 | 0 | 16 | 56 | 77 | 39 | 38 | 10 | 1 |
module Latte.FrontEnd.VariableDeclared where
import Control.Monad.State
import Data.Set
import Latte.Lang
import Latte.Commons
data FeVdState = FeVdState {
declaredNames :: Set String,
undeclaredNames :: Set String
} deriving (Show, Eq)
type FeVdRunner = Runner FeVdState ()
type FeVdReturnType = ReturnType () Fe... | mpsk2/LatteCompiler | src/Latte/FrontEnd/VariableDeclared.hs | mit | 3,585 | 91 | 15 | 658 | 1,444 | 734 | 710 | 95 | 3 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGU... | zoomhub/zoomhub | vendor/servant/servant-server/src/Servant/Server/Experimental/Auth.hs | mit | 2,534 | 0 | 13 | 658 | 473 | 273 | 200 | 47 | 1 |
module Main where
import System.Environment
main :: IO()
main = do
args <- getLine
putStrLn( "Hello, " ++ args)
| brianj-za/wyas | main.hs | mit | 117 | 0 | 9 | 24 | 44 | 23 | 21 | 6 | 1 |
module Kantour.WhoCallsTheFleet.Types
( module Kantour.WhoCallsTheFleet.Types.Ship
, module Kantour.WhoCallsTheFleet.Types.Equipment
) where
import Kantour.WhoCallsTheFleet.Types.Ship
import Kantour.WhoCallsTheFleet.Types.Equipment
| Javran/tuppence | src/Kantour/WhoCallsTheFleet/Types.hs | mit | 239 | 0 | 5 | 21 | 39 | 28 | 11 | 5 | 0 |
-- Examples from chapter 9
-- http://learnyouahaskell.com/input-and-output
import System.IO
withFile' :: FilePath -> IOMode -> (Handle -> IO a) -> IO a
withFile' path mode f = do
handle <- openFile path mode
result <- f handle
hClose handle
return result
| Sgoettschkes/learning | haskell/LearnYouAHaskell/09.hs | mit | 273 | 0 | 11 | 59 | 88 | 40 | 48 | 7 | 1 |
-- Prelude last
myLast :: [a] -> a
myLast x = last x
--call the function recursively until there's only one element left
myLast' :: [a] -> a
myLast' [x] = x
myLast' (_:xs) = myLast' xs
| queirozfcom/haskell-99-problems | problem1.hs | mit | 192 | 0 | 8 | 44 | 78 | 38 | 40 | 5 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.