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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
--data List a = Empty | Cons a (List a) deriving (Show, Read, Eq, Ord)
--data List a = Empty | Cons { listHead :: a, listTail :: List a} deriving (Show, Read, Eq, Ord)
infixr 5 :-:
data List a = Empty | a :-: (List a) deriving (Show, Read, Eq, Ord)
infixr 5 .++
(.++) :: List a -> List a -> List a
Empty .++ ys = ys
(x ... | RAFIRAF/HASKELL | myList.hs | mit | 355 | 0 | 8 | 83 | 116 | 62 | 54 | 6 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Text.HTML.Haskpress
( makeSlide
, nextSlide
, slideToHtml
, genSlides
, renderSlides
, renderFromFile
, renderFromFileToFile
) where
import qualified Data.ByteString.Lazy as L
import Text.Blaze.Html5 hiding (map)
import Text.Blaze.Html5.Attributes
import qual... | rokob/haskpress | src/Text/HTML/Haskpress.hs | mit | 5,741 | 0 | 25 | 1,185 | 1,991 | 1,012 | 979 | 145 | 2 |
module Data.SemVer (
module Data.SemVer.Types,
module Data.SemVer.Parser
) where
import Data.SemVer.Types
import Data.SemVer.Parser
| adnelson/semver-range | src/Data/SemVer.hs | mit | 139 | 0 | 5 | 20 | 34 | 23 | 11 | 5 | 0 |
module Database.Toxic.Streams where
import Database.Toxic.Types
import Data.Function
import Data.List (foldl', sortBy)
import qualified Data.Map.Strict as M
import qualified Data.Text as T
import qualified Data.Vector as V
import qualified Text.Show.Text as T
nullStream :: Stream
nullStream = Stream {
streamHeader... | MichaelBurge/ToxicSludgeDB | src/Database/Toxic/Streams.hs | mit | 6,166 | 0 | 16 | 1,407 | 1,482 | 771 | 711 | 116 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- TODO: rewrite this abomination
-- TODO: move to separate project
-- | HMAC middleware (for Github webhook calls) to filter requests that do not
-- have the correct signature generated with the shared secret.
module HmacMiddleware
( hma... | UlfS/ghmm | app/HmacMiddleware.hs | mit | 5,149 | 0 | 17 | 1,311 | 1,014 | 563 | 451 | 91 | 6 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RecordWildCards #-}
module Foundation where
import Import.NoFoundation
import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym)
import Yesod.Auth.BrowserId (authBrowserId)... | SimSaladin/hajong | hajong-site/Foundation.hs | mit | 14,676 | 0 | 24 | 3,637 | 2,731 | 1,453 | 1,278 | -1 | -1 |
module Y2016.M08.D26.Exercise where
import Control.Monad.Writer
import Data.Map (Map)
import Data.Time
import Control.DList
import Control.Presentation (laxmi)
import Data.Monetary.Currency
import Data.Monetary.USD
import Y2016.M08.D25.Exercise
{--
Similarity? or Disparity?
Yesterday we looked at bitcoin, a curren... | geophf/1HaskellADay | exercises/HAD/Y2016/M08/D26/Exercise.hs | mit | 3,868 | 0 | 10 | 617 | 383 | 217 | 166 | 32 | 1 |
module CipherTest where
import Cipher
import Test.Hspec
import Test.QuickCheck
genSafeChar :: Gen Char
genSafeChar = elements $ ['a'..'z'] ++ ['A'..'Z']
genSafeString :: Gen String
genSafeString = listOf genSafeChar
genTuple :: Gen (String, String)
genTuple = do
a <- listOf genSafeChar
b <- listOf genSafeChar
... | mudphone/HaskellBook | src/CipherTest.hs | mit | 721 | 0 | 18 | 159 | 257 | 129 | 128 | -1 | -1 |
module Raskell.Parser.RubyParser
( rubyToken
, parens
, add
, numeric
, expr
, parseRubySource
) where
import Text.Parsec
import Text.Parsec.String (Parser)
import Text.Parsec.Char
import Control.Monad (void)
import Raskell.Parser.FunctionsAndTypesForParsing (regularParse, parseWithEof, parseWithLeftOver)
import Raske... | joshsz/raskell | src/Raskell/Parser/RubyParser.hs | mit | 2,353 | 0 | 11 | 558 | 775 | 393 | 382 | 74 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Style where
import Data.Maybe (mapMaybe, maybe, isJust, fromJust)
import Data.Function (on)
import Data.List (sortBy, find)
import qualified Data.HashMap.Strict as HM
import qualified Data.HashSet as HS
import qualified Data.Text as T
import Dom
import CSS
type PropertyMap ... | Hrothen/Hubert | src/Style.hs | mit | 3,717 | 0 | 11 | 905 | 943 | 504 | 439 | 53 | 3 |
module Galua.Util.SmallVec where
import Data.Vector(Vector)
import qualified Data.Vector as Vector
import Data.Vector.Mutable (IOVector)
import qualified Data.Vector.Mutable as IOVector
import Control.Monad(replicateM_)
data SmallVec a = Vec0
| Vec1 a
| Vec2 a a
... | GaloisInc/galua | galua-rts/src/Galua/Util/SmallVec.hs | mit | 6,796 | 0 | 16 | 2,572 | 2,741 | 1,339 | 1,402 | 205 | 10 |
module Colour (
fromHSV
)where
import Graphics.Gloss
type HSV = (Double, Double, Double)
-- [0,360] \times [0,1] \times [0,1]
-- from: https://en.wikipedia.org/wiki/HSL_and_HSV#Converting_to_RGB
fromHSV :: HSV -> Color
fromHSV (_,0,v) = toC (v,v,v)
fromHSV (_,_,0) = toC (0,0,0)
f... | lesguillemets/fibonacci_word_fractal.hs | src/Colour.hs | mit | 892 | 0 | 13 | 375 | 409 | 236 | 173 | 24 | 7 |
{-# LANGUAGE OverloadedStrings #-}
module Codec.Soten.PostProcess.TriangulateTest where
import Test.Hspec
import Control.Lens ((&), (^.), (%~), (.~))
import qualified Data.Vector as V
import Linear
import Codec.Soten.PostProcess.Triangulate
import Codec.Soten.Scene
import Codec.Soten.Scene.Mesh
faces = V.fromList [... | triplepointfive/soten | test/Codec/Soten/PostProcess/TriangulateTest.hs | mit | 959 | 0 | 19 | 184 | 263 | 151 | 112 | 23 | 1 |
import Control.Monad
module IO_inside where
definitions = undefined
| Muzietto/geiesmonads | haskell/IO_inside/IO_inside.hs | mit | 76 | 0 | 5 | 16 | 18 | 9 | 9 | -1 | -1 |
{-# htermination any :: (a -> Bool) -> [a] -> Bool #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_any_1.hs | mit | 55 | 0 | 2 | 12 | 3 | 2 | 1 | 1 | 0 |
module Discussion.Eval where
import Discussion.Data
--------------------------------------------------------------------------------
-- subst v t t'
-- tの中に登場するvをt'で置き換える
subst :: Var -> Term -> Term -> Term
subst v t (App ts) = App $ map (subst v t) ts
subst v t l@(Lambda vs t')
| v `elem` vs = l
| oth... | todays-mitsui/discussion | src/Discussion/Eval.hs | mit | 803 | 0 | 8 | 190 | 290 | 146 | 144 | 17 | 1 |
fib 1 = 1
fib 2 = 1
fib x = fib(x-1) + fib(x-2)
hoge (n) | n < 10 = -100
| n >= 10 = 100
hage [] = []
hage (x:xs) = hoge(x):hage(xs)
qsort [] = []
qsort (m:xs) = qsort low ++ [m] ++ qsort high
where
low = [ x | x <- xs, x < m ]
high = [ x | x <- xs, x > m ]
sortFile "" = []
sor... | ttakamura/sandbox | pearls/q_1_1/q_1_1.hs | mit | 486 | 0 | 10 | 156 | 307 | 152 | 155 | 16 | 1 |
module Shapes
( Point(..)
, Shape(..)
, area
) where
data Point = Point Float Float deriving(Show)
data Shape = Circle Point Float | Rectangle Point Point
deriving (Show)
area :: Shape -> Float
area (Circle _ r) = pi * r ^ 2
area (Rectangle (Point x1 y1) (Point x2 y2)) = (abs $ x2 - x1) * (abs $ y2 - y1)
| weswilliams/learn-haskell | src/shape/shape.hs | mit | 313 | 0 | 9 | 71 | 157 | 87 | 70 | 10 | 1 |
module CodeGen.SerializeCode where
import Data.List
import Data.Serialize
import GHC.Generics
import Data.Name
import Data.Schema
import CodeGen.HaskellCode
import Server.NutleyInstance
import Data.Types
import CodeGen.Join
import CodeGen.Metadata.Metadata
import CodeGen.NutleyQuery
import CodeGen.Metadata.SimpleReco... | jvictor0/JoSQL | CodeGen/SerializeCode.hs | mit | 1,687 | 0 | 15 | 303 | 449 | 232 | 217 | 33 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Parser.Simple where
import Core
import Language.GoLite.Parser.SimpleStmts
assign :: SpecWith ()
assign = do
let parseAssign = parseOnly (fmap bareStmt $ assignStmt >>= unSemiP)
it "parses increments and decrements" $ do
parseAssign "x++;" `shouldBe` r (incre... | djeik/goto | test/Parser/Simple.hs | mit | 8,542 | 0 | 18 | 2,165 | 1,890 | 916 | 974 | 152 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-lambdaconfig.html
module Stratosphere.ResourceProperties.AppSyncDataSourceLambdaConfig whe... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/AppSyncDataSourceLambdaConfig.hs | mit | 1,652 | 0 | 13 | 164 | 174 | 100 | 74 | 23 | 1 |
module Two where
import Data.List
import Data.Ord
fak :: Int -> Int -> Int
fak i j = foldl1 (*) [i..j]
is_prime :: Int -> Bool
is_prime p
| p == 2 = True
| even p = False
| otherwise = looper 3
where looper i
| i*i > p = True
| 0 == rem p i = False
| otherwise = looper $ i+2
pr... | zeniuseducation/poly-euler | haskell/next/two.hs | epl-1.0 | 5,229 | 0 | 15 | 1,887 | 2,624 | 1,313 | 1,311 | 149 | 4 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Handler.Home where
import Import
import Handler.Util
import qualified Data.Map.Strict as Map
-- The GET handler displays the form
getHomeR :: Handler Html
getHomeR = do
-- Generate the form to be displayed
(widget, enctype) <- generat... | bartoszw/yelca | Handler/Home.hs | gpl-2.0 | 6,627 | 0 | 18 | 2,783 | 908 | 463 | 445 | -1 | -1 |
-- Dragon.hs
-- La curva dragón
-- José A. Alonso Jiménez <jalonso@us.es>
-- Sevilla, 24 de Mayo de 2014
-- ---------------------------------------------------------------------
module Tema_26.Dragon2 where
import Graphics.Gloss
-- import System.IO
main :: IO ()
main = do display (InWindow "Dragon" (500,500) (20,20)... | jaalonso/I1M-Cod-Temas | src/Tema_26/Dragon2.hs | gpl-2.0 | 610 | 0 | 11 | 127 | 194 | 108 | 86 | 9 | 1 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid 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 3 of the Lice... | karamellpelle/grid | designer/source/LevelTools/Output.hs | gpl-3.0 | 15,329 | 1 | 15 | 5,825 | 2,752 | 1,293 | 1,459 | 223 | 9 |
module Main where
import Control.Applicative
import Control.Monad
import Data.List (lookup)
import System.Console.Quickterm
main = qtMain myQtProgram
myQtProgram = program
[ command "install" $ cmdInstall <$> flags
[ ("--bindir" , Just "/default/bindir" )
, ("--docdir" ,... | SamuelSchlesinger/Quickterm | src/demo/Main.hs | gpl-3.0 | 1,353 | 0 | 11 | 308 | 305 | 155 | 150 | 37 | 1 |
module Dsgen.GUIState (
GUI(..),
GUIState(..),
CardListRow(..),
readGUI,
getGUIState,
mkSetSelectOptions,
cardListAppend,
cardListRemove
) where
import Control.Monad.Error
import Control.Monad.Trans(liftIO)
import Data.List((\\), sort)
import Graphics.UI.Gtk
import Dsgen.Cards
impo... | pshendry/dsgen | src/Dsgen/GUIState.hs | gpl-3.0 | 21,963 | 0 | 15 | 6,081 | 4,021 | 2,172 | 1,849 | 386 | 40 |
{-| Module : DoublyLinkedTree
License : GPL
Maintainer : helium@cs.uu.nl
Stability : experimental
Portability : portable
In a doubly linked, every node has access to its parent and its children.
At each node, extra information (attributes) can be stored.
-}
module Helium.St... | roberth/uu-helium | src/Helium/StaticAnalysis/Miscellaneous/DoublyLinkedTree.hs | gpl-3.0 | 1,260 | 0 | 11 | 341 | 244 | 126 | 118 | 17 | 2 |
contramap :: (c' -> c) -> (c -> LimD) -> (c' -> LimD)
contramap f u = u . f | hmemcpy/milewski-ctfp-pdf | src/content/2.2/code/haskell/snippet02.hs | gpl-3.0 | 76 | 0 | 8 | 20 | 49 | 26 | 23 | 2 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Sound.Tidal.Simple where
import Sound.Tidal.Control (chop, hurry)
import Sound.Tidal.Core ((#), (|*), (<~), silence, rev)
import Sound.Tidal.Params (crush, gain, pan, speed, s)
import Sound.Tidal.ParseBP (parseBP_E)
... | d0kt0r0/Tidal | src/Sound/Tidal/Simple.hs | gpl-3.0 | 1,263 | 41 | 6 | 189 | 385 | 215 | 170 | 35 | 1 |
module Tests.TemplateHaskell where
import QHaskell.MyPrelude
import Language.Haskell.TH.Syntax
add :: Word32 -> Word32 -> Word32
add = (+)
dbl :: Q (TExp (Word32 -> Word32))
dbl = [||\ x -> add x x ||]
compose :: Q (TExp ((tb -> tc) -> (ta -> tb) -> ta -> tc))
compose = [|| \ x2 -> \ x1 -> \ x0 -> x2 (x1 x... | shayan-najd/QHaskell | Tests/TemplateHaskell.hs | gpl-3.0 | 398 | 6 | 14 | 96 | 201 | 112 | 89 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Returnaddress/Insert.hs | mpl-2.0 | 5,198 | 0 | 18 | 1,234 | 802 | 465 | 337 | 117 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Controller.Register
( passwordResetHandler
, viewPasswordReset
, postPasswordReset
, registerHandler
, viewRegister
, postRegister
, resendInvestigatorHandler
, resendInvestigator
) where
import Control.Applicative ((<$>))
import qualified Data.ByteString as ... | databrary/databrary | src/Controller/Register.hs | agpl-3.0 | 6,524 | 0 | 20 | 1,157 | 1,640 | 866 | 774 | 129 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, TypeFamilies #-}
module Coercion where
-- Start basic
class Add a b where
type SumTy a b
add :: a -> b -> SumTy a b
instance Add Integer Double where
type SumTy Integer Double = Double
add x y = fromIntegral x + y
instance Add Double In... | egaburov/funstuff | Haskell/fun-with-types/codes/Coercion.hs | apache-2.0 | 1,206 | 0 | 10 | 302 | 442 | 235 | 207 | 33 | 1 |
{-
Copyright (c) Facebook, Inc. and its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ... | facebook/fbthrift | thrift/lib/hs/Thrift/Transport/HttpClient.hs | apache-2.0 | 3,626 | 0 | 16 | 879 | 549 | 305 | 244 | 59 | 2 |
{-# LANGUAGE BangPatterns #-}
module Main where
import Prelude hiding (concat, filter)
import Data.Alpino.Model.Conduit
import Data.Conduit (Sink, runResourceT, ($=), ($$))
import qualified Data.Conduit.Binary as CB
import qualified Data.Conduit.List as CL
import System.IO (stdin)
import Text.Printf (printf)
sumCou... | danieldk/alpino-tools | utils/model_oracle.hs | apache-2.0 | 853 | 0 | 16 | 188 | 283 | 161 | 122 | 20 | 1 |
module Spake2 (tests) where
import Protolude hiding (group)
import Test.Tasty (TestTree)
import Test.Tasty.Hspec (testSpec, describe, it, shouldBe, shouldNotBe)
import Crypto.Hash (SHA256(..))
import qualified Crypto.Spake2 as Spake2
import qualified Crypto.Spake2.Group as Group
import Crypto.Spake2.Groups (Ed25519(.... | jml/haskell-spake2 | tests/Spake2.hs | apache-2.0 | 2,925 | 0 | 20 | 566 | 809 | 415 | 394 | 52 | 1 |
{-# LANGUAGE RecordWildCards #-}
module Grouping(Grouping(..), grouping) where
import Data.Maybe
import Data.List
import System.FilePath
data Grouping = Grouping
{grpFile :: FilePath
,grpParts :: [(String, String)] -- (part name, part nice name), must be in file order
,grpGroups :: [(String, [String])] ... | ndmitchell/fossilizer | Grouping.hs | apache-2.0 | 1,231 | 0 | 16 | 309 | 332 | 188 | 144 | 21 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TupleSections #-}
module Tetris.Coord where
import Data.Bool
import Data.Eq
import Data.Function (($),(.))
import Data.Functor (fmap)
import Data.Int
import Data.List ((++))
import Data.Maybe
import Data.Ord
import GHC.Enum (Bounded,minBound,maxBound)
import GHC.Num
impo... | melrief/tetris | src/Tetris/Coord.hs | apache-2.0 | 2,411 | 0 | 11 | 620 | 999 | 547 | 452 | 76 | 1 |
-------------------------------------------------------------------------------
-- Estructuras de Datos. 2º Curso. ETSI Informática. UMA
--
-- (completa y sustituye los siguientes datos)
-- Titulación: Grado en Ingeniería Informática
-- Alumno: GUTIÉRREZ OJEDA, ANTONIO
-- Fecha de entrega: DIA | MES | AÑO
--
-- Relació... | Saeron/haskell | AGO-Rel1-1-17.hs | apache-2.0 | 6,374 | 2 | 13 | 1,703 | 2,890 | 1,534 | 1,356 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -Wall #-}
module CabalBrew.Paths
( cellar
) where
import Filesystem.Path.CurrentOS
import Prelude hiding (FilePath, concat)
cellar :: FilePath
cellar = concat ["/usr", "local", "Cellar"]
| erochest/cabal-brew | CabalBrew/Paths.hs | apache-2.0 | 292 | 0 | 6 | 84 | 53 | 34 | 19 | 8 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QStyleOptionTabV2.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:16
Warning : this file is machine generated ... | keera-studios/hsQt | Qtc/Gui/QStyleOptionTabV2.hs | bsd-2-clause | 3,322 | 0 | 12 | 474 | 774 | 405 | 369 | -1 | -1 |
module Context(module Context.Types
,module Context.Language) where
import Context.Types
import Context.Language
| lih/Alpha | src/Context.hs | bsd-2-clause | 128 | 0 | 5 | 25 | 28 | 18 | 10 | 4 | 0 |
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances, OverloadedStrings #-}
module Web.PathPieces
( PathPiece (..)
, PathMultiPiece (..)
-- * Deprecated
, toSinglePiece
, toMultiPiece
, fromSinglePiece
, fromMultiPiece
) where
import Data.Int (Int8, Int16, Int32, Int64)
import Data.Word... | MaxGabriel/path-pieces | Web/PathPieces.hs | bsd-2-clause | 4,122 | 0 | 15 | 954 | 1,167 | 629 | 538 | 110 | 2 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAG... | PipocaQuemada/ermine | src/Ermine/Syntax/Module.hs | bsd-2-clause | 8,219 | 0 | 13 | 1,467 | 2,054 | 1,173 | 881 | 186 | 1 |
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE OverloadedStrings #-}
module HTTPUtils
( sendHTTPRequest
, methodGet
, methodPost
) where
import Aliases
import MonadImports
import qualified Control.Exception as E
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as L
import qualified Data.ByteSt... | bgwines/hueue | lib/HTTPUtils.hs | bsd-3-clause | 1,267 | 0 | 13 | 232 | 307 | 176 | 131 | 37 | 1 |
{------------------------------------------------------------------------------
Control.Monad.Operational
Example:
Koen Claessen's Poor Man's Concurrency Monad
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.39.8039
--------------------------------------------------------------------------... | HeinrichApfelmus/operational | doc/examples/PoorMansConcurrency.hs | bsd-3-clause | 2,233 | 0 | 13 | 559 | 506 | 262 | 244 | 32 | 5 |
-- | An implementation of Knuth-Bendix ordering.
{-# LANGUAGE PatternGuards, BangPatterns #-}
module Twee.KBO(lessEq, lessIn, lessEqSkolem, Sized(..), Weighted(..)) where
import Twee.Base hiding (lessEq, lessIn, lessEqSkolem)
import Twee.Equation
import Twee.Constraints hiding (lessEq, lessIn, lessEqSkolem)
import qu... | nick8325/kbc | src/Twee/KBO.hs | bsd-3-clause | 5,771 | 0 | 21 | 1,723 | 2,711 | 1,343 | 1,368 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module NLP.Albemarle.Test.Fixture where
import Prelude hiding (words, lines, readFile)
import Test.Hspec
import Data.List hiding (words, lines)
import Data.Text (Text, words, lines)
import Data.Text.IO (readFile)
import qualified Data.IntMap.Strict as ... | SeanTater/albemarle | test/NLP/Albemarle/Test/Fixture.hs | bsd-3-clause | 829 | 0 | 12 | 132 | 213 | 130 | 83 | 24 | 1 |
module Ebitor.Language
( parseKeyEvents
) where
import Control.Monad
import Data.Char
import Data.Foldable (foldr', foldr1)
import Data.List (nub)
import Data.Maybe
import Text.Parsec
import Text.Parsec.Char
import Text.Parsec.Text
import qualified Data.Text as T
import Ebitor.Events
ichar :: Char -> Parser... | benekastah/ebitor | src/Ebitor/Language.hs | bsd-3-clause | 4,112 | 0 | 13 | 1,012 | 1,500 | 733 | 767 | 162 | 1 |
{-# LANGUAGE BangPatterns, ExplicitForAll, TypeOperators, MagicHash #-}
{-# OPTIONS -fno-warn-orphans #-}
module Data.Array.Repa.Operators.Reduction
( foldS, foldP, reduceLTS
, foldAllS, foldAllP
, sumS, sumP
, sumAllS, sumAllP
, equalsS, equalsP)
where
import Data.Array.Repa.Ba... | kairne/repa-lts | Data/Array/Repa/Operators/Reduction.hs | bsd-3-clause | 6,302 | 79 | 22 | 1,701 | 1,789 | 964 | 825 | -1 | -1 |
module Errors where
import Control.Monad (when)
import System.Exit (exitWith, ExitCode(..))
exitWithError :: String -> IO a
exitWithError s = putStrLn s >> exitWith (ExitFailure 1)
--
-- Adds a new line on the end of the error message.
--
exitWithErrorIf :: Bool -> String -> IO ()
exitWithErrorIf condition reason =... | sseefried/task | src/Errors.hs | bsd-3-clause | 704 | 0 | 10 | 126 | 222 | 111 | 111 | 15 | 1 |
module HasOffers.API.Brand.Application
where
import Data.Text
import GHC.Generics
import Data.Aeson
import Control.Applicative
import Network.HTTP.Client
import qualified Data.ByteString.Char8 as BS
import HasOffers.API.Common
--------------------------------------------------------------------------------
a... | kelecorix/api-hasoffers | src/HasOffers/API/Brand/Application.hs | bsd-3-clause | 7,256 | 0 | 8 | 2,334 | 1,587 | 760 | 827 | 238 | 1 |
module Text.ICalendar.DataType.Duration
( durationType
) where
-- haskell platform libraries
import Control.Applicative ((<$>))
import Data.Time.Clock (DiffTime, secondsToDiffTime)
import Text.Parsec.String
import Text.Parsec.Combinator
import Text.Parsec.Char
import Text.Parsec.Prim
-- native libraries
import Text.I... | Jonplussed/iCalendar | src/Text/ICalendar/DataType/Duration.hs | bsd-3-clause | 1,252 | 0 | 12 | 239 | 404 | 214 | 190 | 33 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import DynFlags
import GHC
import Control.Monad
import Control.Monad.IO.Class (liftIO)
import Data.List
import Data.Maybe
import Data.Time.Calendar
import Data.Time.Clock
import Exception
import HeaderInfo
import HscTypes
import Outputable
import StringBuffer
im... | sdiehl/ghc | testsuite/tests/ghc-api/target-contents/TargetContents.hs | bsd-3-clause | 4,330 | 0 | 20 | 1,363 | 1,187 | 645 | 542 | 107 | 4 |
module Geordi.FileBackend where
import qualified Data.ByteString.Lazy as L
import Network.Wai.Parse
newtype FileBackend a = FB (BackEnd a)
lbsBackend :: FileBackend L.ByteString
lbsBackend = FB $ lbsBackEnd
tempFileBackend :: FileBackend FilePath
tempFileBackend = FB $ tempFileBackEnd
| liamoc/geordi | Geordi/FileBackend.hs | bsd-3-clause | 289 | 0 | 7 | 38 | 72 | 43 | 29 | 8 | 1 |
import Blaze.ByteString.Builder.Char8
import Data.Monoid ((<>))
import Data.Text as T
import Text.Strapped
import Text.Strapped.Render
import Text.Strapped.Parser
import Text.Parsec
import Text.Parsec.String
data MyData = MyData ParsedExpression
deriving (Show)
-- | Process MyData in the RenderT monad when it is... | hansonkd/StrappedTemplates | examples/custom_parser.hs | bsd-3-clause | 1,128 | 0 | 18 | 244 | 332 | 174 | 158 | 26 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
---------------------------------------------------------------
-- |
-- Module : Data.Minecraft.Release19.Protocol
-- Copyright : (c) 2016 Mi... | oldmanmike/hs-minecraft-protocol | src/Data/Minecraft/Release19/Protocol.hs | bsd-3-clause | 53,029 | 112 | 14 | 15,962 | 12,535 | 5,806 | 6,729 | -1 | -1 |
{-# LANGUAGE CPP #-}
module Main ( main ) where
import Control.Monad ( mplus, mzero )
import Control.Monad.Search
import Data.Semigroup as Sem
#if MIN_VERSION_tasty_hspec(1,1,7)
import Test.Hspec
#endif
import Test.Tasty
import Test.Tasty.Hsp... | ennocramer/monad-dijkstra | test/Main.hs | bsd-3-clause | 3,250 | 0 | 21 | 1,041 | 1,197 | 629 | 568 | 73 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE RecordWildCards #-}
module Main where
... | da-x/fancydiff | app/Main.hs | bsd-3-clause | 10,321 | 0 | 24 | 4,480 | 2,234 | 1,138 | 1,096 | 176 | 21 |
{-
<TEST>
{- MISSING HASH #-} -- {-# MISSING HASH #-}
<COMMENT> {- INLINE X -}
{- INLINE Y -} -- {-# INLINE Y #-}
{- INLINE[~k] f -} -- {-# INLINE[~k] f #-}
{- NOINLINE Y -} -- {-# NOINLINE Y #-}
{- UNKNOWN Y -}
<COMMENT> INLINE X
</TEST>
-}
module Hint.Comment(commentHint) where
import Hint.Type
import Data.Char
i... | ndmitchell/hlint | src/Hint/Comment.hs | bsd-3-clause | 1,659 | 0 | 15 | 463 | 450 | 237 | 213 | 29 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Cda.Handlers where
-- import qualified Snap.Core as S
import Control.Monad.IO.Class as LIO
import Snap.Core
import Snap
import Snap.Util.FileUploads
import Snap.Snaplet
import Snap.Snaplet.Heist
-- import Snap.Snaplet.Session
-- import qualified Data.ByteString as BS... | SLikhachev/pureCdaViewer | snaplets/cda/src/Cda/arx/_cmp_Handlers.hs | bsd-3-clause | 5,088 | 0 | 19 | 1,006 | 907 | 491 | 416 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Trombone.Db.Execute
( SqlT
, runDb
, collection
, item
, executeCount
, void
, toJsonVal
) where
import Control.Arrow ( second )
import Control.Exception ( Exception, SomeException... | johanneshilden/trombone | Trombone/Db/Execute.hs | bsd-3-clause | 4,422 | 0 | 16 | 1,499 | 1,111 | 592 | 519 | 86 | 13 |
module Main where
import Test.DocTest
main :: IO ()
main = doctest ["Util/Sort.hs"]
| exKAZUu/haskell-dev-env | Test/Doctests.hs | bsd-3-clause | 86 | 0 | 6 | 15 | 30 | 17 | 13 | 4 | 1 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-missing-fields #-}
------------------------------------------------------------------------------
-- |
-- Module : Cmd
-- Copyright : (C) 2014 Samuli Thomasson
-- License : BSD-style (see the file LICENSE)
-- Maintainer : Samuli Thomasson <samuli.th... | SimSaladin/animu-watch | src/Cmd.hs | bsd-3-clause | 9,088 | 2 | 17 | 3,282 | 1,162 | 672 | 490 | -1 | -1 |
module AI.Gameplay (
nMCTSRounds,
bestMove
) where
import AI.MCTS
mctsRound :: (Board b) => GameTree b -> IO (GameTree b)
mctsRound tree = explore tree >>= return . snd
nMCTSRounds :: (Board b) => Int -> GameTree b -> IO (GameTree b)
nMCTSRounds n tree = loopFor n tree where
loopFor n tree = if n > 0... | rudyardrichter/MCTS | old/source/AI/Gameplay.hs | mit | 1,010 | 0 | 11 | 308 | 352 | 184 | 168 | 21 | 2 |
-- | Basic color helpers for prettifying console output.
{-# LANGUAGE OverloadedStrings #-}
module Hledger.Utils.Color
(
color,
bgColor,
Color(..),
ColorIntensity(..)
)
where
import System.Console.ANSI
-- | Wrap a string in ANSI codes to set and reset foreground colour.
color :: ColorIntensity -> Color ->... | ony/hledger | hledger-lib/Hledger/Utils/Color.hs | gpl-3.0 | 627 | 0 | 9 | 115 | 149 | 82 | 67 | 12 | 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="it-IT">
<title>TLS Debug | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref l... | veggiespam/zap-extensions | addOns/tlsdebug/src/main/javahelp/org/zaproxy/zap/extension/tlsdebug/resources/help_it_IT/helpset_it_IT.hs | apache-2.0 | 971 | 92 | 29 | 160 | 402 | 213 | 189 | -1 | -1 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2015 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE FlexibleContexts #... | beni55/cryptol | src/Cryptol/Symbolic/Prims.hs | bsd-3-clause | 25,379 | 0 | 34 | 8,565 | 9,649 | 4,978 | 4,671 | 534 | 12 |
module DPH.Arbitrary
( module DPH.Arbitrary.Int
, module DPH.Arbitrary.Vector
, module DPH.Arbitrary.Perm
, module DPH.Arbitrary.Selector
, module DPH.Arbitrary.SliceSpec
, module DPH.Arbitrary.ArrayExp
, module DPH.Arbitrary.Array
, module DPH.Arbitrary.... | mainland/dph | dph-test/framework/DPH/Arbitrary.hs | bsd-3-clause | 618 | 0 | 5 | 120 | 125 | 86 | 39 | 19 | 0 |
module ShowComments where
import qualified Github.Issues.Comments as Github
import Data.List (intercalate)
main = do
possibleComments <- Github.comments "thoughtbot" "paperclip" 635
case possibleComments of
(Left error) -> putStrLn $ "Error: " ++ show error
(Right issues) ->
putStrLn $ inte... | jwiegley/github | samples/Issues/Comments/ShowComments.hs | bsd-3-clause | 590 | 0 | 12 | 111 | 166 | 85 | 81 | 14 | 2 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Taken quite directly from the Peyton Jones/Lester paper.
-}
{-# LANGUAGE CPP #-}
-- | A module concerned with finding the free variables of an expression.
module CoreFVs (
-- * Free variables of expressions and bi... | mcschroeder/ghc | compiler/coreSyn/CoreFVs.hs | bsd-3-clause | 30,188 | 0 | 14 | 8,131 | 5,531 | 2,977 | 2,554 | 405 | 12 |
{-# Language DeriveFunctor #-}
-- | Accords in just intonation Gm with 14/8 beat.
module Main where
import Csound.Base
import Color(marimbaSynth)
instr (amp, cps) = sig amp * env * osc (sig cps)
where
env = once $ lins [0.00001, 30, 1, 50, 0.5, 100, 0.00001]
en :: Sco a -> Sco a
en = str (1/8)
-- volum... | isomorphism/csound-expression | examples/Gm.hs | bsd-3-clause | 2,875 | 0 | 12 | 953 | 1,399 | 791 | 608 | 77 | 1 |
module PolymorhicIn1 where
f :: [a] -> a
f ((x : xs))
= case xs of
xs@[] -> x
xs@(b_1 : b_2) -> x
f ((x : xs)) = x | SAdams601/HaRe | old/testing/introCase/PolymorphicIn1_TokOut.hs | bsd-3-clause | 146 | 0 | 10 | 61 | 83 | 47 | 36 | 7 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
-- | Resolving a build plan for a set of packages in a given Stack... | kairuku/stack | src/Stack/BuildPlan.hs | bsd-3-clause | 31,313 | 0 | 32 | 10,568 | 7,500 | 3,846 | 3,654 | 588 | 5 |
module Foo where
import Data.Kind (Type)
data Foo (a :: Type) = Foo a
| sdiehl/ghc | testsuite/tests/parser/should_fail/readFail036.hs | bsd-3-clause | 72 | 0 | 6 | 16 | 30 | 19 | 11 | -1 | -1 |
module StateMonad () where
type State = Int
data ST a = S (State -> (a, State))
{-@ data ST a <p1 :: State -> Prop,
p2 :: State -> Prop>
= S (x::(f:State<p1> -> (a, State<p2>)))
@-}
{-@ fresh :: ST <{\v -> v>=0}, {\v -> v>=0}> Int @-}
fresh :: ST Int
fresh = S $ \n -> (n, n-1)
| mightymoose/liquidhaskell | tests/neg/state0.hs | bsd-3-clause | 306 | 0 | 9 | 90 | 70 | 43 | 27 | 5 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances #-}
module Reflex.Cocos2d.Builder.Class
( Time
, NodeBuilder(..)
, (-<<)
, (-<)
) where
import Control.Monad.Trans
import Control.Monad.Trans.Control
import Reflex
import Reflex.State
import Graphics... | lynnard/reflex-cocos2d | src/Reflex/Cocos2d/Builder/Class.hs | mit | 1,650 | 0 | 12 | 372 | 527 | 285 | 242 | 45 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Lens.Micro ((.~))
import Control.Arrow (second)
import Data.Yaml (decodeFileEither, prettyPrintParseException)
import Paths_DBPnet (version)
import Data.Version (showVersion)
import Text.Printf (printf)
import Options.Applicative
import Data.Default
import S... | kaizhang/DBPnet | src/Main.hs | mit | 3,717 | 0 | 25 | 1,293 | 975 | 492 | 483 | 92 | 6 |
module Raindrops (convert) where
m :: [(Int, String)]
m = [
(3, "Pling"),
(5, "Plang"),
(7, "Plong")]
convert :: Int -> String
convert n = w
where
s = concatMap (\(a, b) -> if n `mod` a == 0 then b else "") m
w = if s == "" then show n else s
| c19/Exercism-Haskell | raindrops/Raindrops.hs | mit | 261 | 0 | 12 | 73 | 136 | 82 | 54 | 10 | 3 |
-- |Netrium is Copyright Anthony Waite, Dave Hewett, Shaun Laurens & Contributors 2009-2018, and files herein are licensed
-- |under the MIT license, the text of which can be found in license.txt
--
module Main where
import Contract (Contract, Time)
import Interpreter
import DecisionTree
import Observations
import Pa... | netrium/Netrium | tool/Simulate.hs | mit | 10,953 | 0 | 17 | 3,456 | 2,789 | 1,418 | 1,371 | 225 | 4 |
module Calc where
import ExprT
import Parser
eval :: ExprT -> Integer
eval (Lit x) = x
eval (Add x y) = (eval x) + (eval y)
eval (Mul x y) = (eval x) * (eval y)
evalStr :: String -> Maybe Integer
evalStr x = case parseExp Lit Add Mul x of
Nothing -> Nothing
Just y -> Just (eval y)
... | gscalzo/HaskellTheHardWay | cis194/week5/Calc.hs | mit | 1,222 | 0 | 10 | 392 | 615 | 314 | 301 | 41 | 2 |
{--
Copyright (c) 2012 Gorka Suárez García
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distri... | gorkinovich/Haskell | Modules/MathUtil.hs | mit | 8,997 | 0 | 12 | 2,172 | 2,475 | 1,334 | 1,141 | 133 | 5 |
module OpenAI.Gym.Prelude
( module P
) where
import Control.Monad as P
import Control.Monad.Loops as P
import Control.Monad.Trans.Except as P (runExceptT)
import Data.Aeson as P
import Data.HashMap.Strict as P (HashMap)
im... | Lucsanszky/gym-http-api | binding-hs/src/OpenAI/Gym/Prelude.hs | mit | 770 | 0 | 5 | 370 | 135 | 95 | 40 | 15 | 0 |
module C07.Geometry(sphereVolume, sphereArea, cubeVolume, cubeArea, cuboidArea, cuboidVolume) where
sphereVolume :: Float -> Float
sphereVolume radius = (4.0 / 3.0) * pi * (radius ^ 3)
sphereArea :: Float -> Float
sphereArea radius = 4 * pi * (radius ^ 2)
cubeVolume :: Float -> Float
cubeVolume side = ... | Sgoettschkes/learning | haskell/LearnYouAHaskell/C07/Geometry.hs | mit | 740 | 0 | 10 | 173 | 274 | 143 | 131 | 15 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Web.JsonParser where
import qualified Data.Text as T
import Data.Time
import Data.Maybe
import Web.Utils
import Model.Types
checkJson :: [Maybe T.Text] -> Maybe [T.Text]
checkJson xs | null $ filter isNothing xs = Just (map fromJust xs)
| otherwise = Nothing
j... | elfeck/elfeckcom | src/Web/JsonParser.hs | mit | 1,368 | 0 | 10 | 401 | 414 | 214 | 200 | 35 | 3 |
{-# LANGUAGE PackageImports #-}
{-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-unused-imports #-}
-- | Reexports "Data.Bitraversable.Compat"
-- from a globally unique namespace.
module Data.Bitraversable.Compat.Repl (
module Data.Bitraversable.Compat
) where
import "this" Data.Bitraversable.Compat
| haskell-compat/base-compat | base-compat/src/Data/Bitraversable/Compat/Repl.hs | mit | 304 | 0 | 5 | 31 | 28 | 21 | 7 | 5 | 0 |
module LearnParsers where
import Text.Trifecta
stop :: Parser a
stop = unexpected "Stop"
one = char '1'
one' = one >> stop
-- read two characters, '1', and '2'
oneTwo = char '1' >> char '2'
-- read two characters, '1' and '2', then die
oneTwo' = oneTwo >> stop
testParse :: Parser Char -> IO ()
testParse p = print... | diminishedprime/.org | reading-list/haskell_programming_from_first_principles/24_03.hs | mit | 1,793 | 0 | 10 | 368 | 415 | 195 | 220 | 40 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import System.Environment
import Parser
import Eval
import Pretty
import Syntax
import qualified Data.Text as T
import qualified Data.Text.IO as T
hoistError :: Either Error (Term, Type) -> T.Text
hoistError ex =
case ex of
Left err -> T.pack $ "\ESC... | kellino/TypeSystems | typedArith/Main.hs | mit | 669 | 0 | 14 | 163 | 226 | 118 | 108 | 22 | 2 |
module Main where
import Lambda
main :: IO ()
main = do
_ <- putStrLn "Enter term"
input <- getContents
let term = parseTerm input
_ <- putStrLn (seq term "Parsed term:")
_ <- putStrLn . show $ term
_ <- putStrLn ""
_ <- putStrLn $ "Size: " ++ (show . getSize $ term)
_ <- putStrLn ""
let freeVaria... | scott-fleischman/lambda-calculus | haskell/lambda/app/Main.hs | mit | 763 | 0 | 15 | 176 | 320 | 151 | 169 | 24 | 1 |
module Carter where
import qualified Data.ByteString.Lazy as BL
import qualified Data.Foldable as F
import Data.Csv.Streaming
type BaseballStats = (BL.ByteString, Int, BL.ByteString, Int)
baseballStats :: BL.ByteString -> Records BaseballStats
baseballStats = decode NoHeader
fourth :: (a, b , c, d) -> d
fourth (_, ... | mjamesruggiero/carter | src/Carter.hs | mit | 553 | 0 | 10 | 99 | 202 | 117 | 85 | 15 | 1 |
{-# LANGUAGE GADTs, LambdaCase, OverloadedStrings, StandaloneDeriving #-}
module Language.RobotC.Data.Program
( RobotC
, R
, Stmt (..)
, Expr (..)
, Var (..)
, ArrayVar (..)
, IndexVar (..)
, Ident, unIdent, mkIdent
) where
import Prelude as P
import Control.Monad.Trans.Writer
imp... | qsctr/haskell-robotc | src/Language/RobotC/Data/Program.hs | mit | 5,043 | 26 | 13 | 1,339 | 2,118 | 1,068 | 1,050 | -1 | -1 |
module ReverseWordsTests where
import ReverseWords
import Test.Hspec
tests :: SpecWith ()
tests = describe "ReverseWords" $
it "should work for the provided examples" $ do
reverseWords "Hello World" `shouldBe` "World Hello"
reverseWords "Hello CodeEval" `shouldBe` "CodeEval Hello"
| RaphMad/CodeEval | test/ReverseWordsTests.hs | mit | 299 | 0 | 9 | 54 | 65 | 34 | 31 | 8 | 1 |
{-# OPTIONS_GHC -w #-}
{-# LANGUAGE RebindableSyntax, NoImplicitPrelude #-}
-- |
-- Module : Control.Delimited.Tutorial
-- Copyright : (c) Oleg Kiselyov 2007-2013, (c) Austin Seipp 2012-2013
-- License : MIT
--
-- Maintainer : mad.one@gmail.com
-- Stability : experimental
-- Portability : portable
--
-- T... | thoughtpolice/hs-asai | src/Control/Delimited/Tutorial.hs | mit | 12,533 | 0 | 4 | 2,504 | 76 | 69 | 7 | 6 | 0 |
-- Compile with `ghc -o hello hello.hs`
import System.Environment
greeter :: String -> String
greeter s = "Hello, " ++ s
main :: IO ()
main = putStrLn $ greeter "plexus"
| pxlpnk/xhelloworlds | haskell/hello.hs | mit | 173 | 0 | 6 | 34 | 50 | 26 | 24 | 5 | 1 |
{-# LANGUAGE QuasiQuotes #-}
module View.Equipment where
import Model
import View.Helpers
import View.Layout
equipmentListView :: [Entity Equipment] -> Html
equipmentListView equipment = layout [shamlet|
<a href="/equipment/new">Add Equipment
<ul>
$forall Entity key e <- equipment
<li>
#{equipme... | flipstone/glados | src/View/Equipment.hs | mit | 1,173 | 0 | 7 | 221 | 145 | 82 | 63 | 13 | 1 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.CSSRuleList (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.CSSRuleList
#else
module Graphics.UI.Gtk.WebKit.DOM.CSSRuleList
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defi... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/CSSRuleList.hs | mit | 440 | 0 | 5 | 39 | 33 | 26 | 7 | 4 | 0 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
-- ------------------------------------------------------------
module Control.Monad.ReaderStateIOError
( module Control.Monad.ReaderStateIOError
)
where
import Control.Applicative
im... | ichistmeinname/holumbus | src/Control/Monad/ReaderStateIOError.hs | mit | 2,765 | 4 | 18 | 1,000 | 807 | 420 | 387 | 57 | 1 |
-- |
-- Module: Control.GUI
-- Copyright: (c) 2015 Schell Scivally
-- License: MIT
-- Maintainer: Schell Scivally <efsubenovex@gmail.com>
--
-- GUI's goal is to abstract over graphical user interfaces, assurring
-- they are renderable, dynamic (they change over their domain) and eventually
-- prod... | schell/gooey | src/Control/GUI.hs | mit | 3,430 | 0 | 14 | 731 | 482 | 278 | 204 | 31 | 2 |
module Grammar.Common.List where
import Grammar.Common.Types
import qualified Data.Map.Strict as Map
addIndex :: [a] -> [Int :* a]
addIndex = zip [0..]
addReverseIndex :: [a] -> [Int :* a]
addReverseIndex = snd . foldr go (0, [])
where
go x (i, xs) = (i + 1, (i, x) : xs)
groupPairs :: Ord k => [k :* v] -> [k :*... | ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/List.hs | mit | 1,001 | 0 | 12 | 236 | 584 | 322 | 262 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.