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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- | An umbrella module reexporting most types from the codebase (excluding
-- specialized ones, like ones from "Guide.Markdown").
module Guide.Types
(
module Guide.Types.Hue,
module Guide.Types.Core,
module Guide.Types.Edit,
module Guide.Types.Analytics,
module Guide.Types.User,
module Guide.Types.Session,... | aelve/guide | back/src/Guide/Types.hs | bsd-3-clause | 481 | 0 | 5 | 61 | 89 | 62 | 27 | 14 | 0 |
module Scheme.Types where
import Control.Monad.Except
import Data.IORef
import qualified Data.Vector as V
import GHC.IO.Handle
import Text.Parsec
data LispValue = Atom String
| List [LispValue]
| DottedList [LispValue] LispValue
| Ve... | drets/scheme-haskell-48h | src/Scheme/Types.hs | bsd-3-clause | 4,002 | 0 | 12 | 1,303 | 1,298 | 671 | 627 | 88 | 2 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad
import Control.Monad.Trans
import Control.Monad.Trans.Resource
import System.Environment
import System.Exit
import System.Directory
import System.IO
import Data... | philopon/arib | examples/tsselect.hs | bsd-3-clause | 3,038 | 0 | 23 | 835 | 1,056 | 573 | 483 | 70 | 3 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE ExistentialQuantifi... | ezyang/ghc | libraries/base/GHC/TypeNats.hs | bsd-3-clause | 5,112 | 3 | 10 | 1,014 | 1,107 | 665 | 442 | -1 | -1 |
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
{-# OPTIONS_GHC -Wno-incomplete-patterns #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencie... | louispan/data-diverse | src/Data/Diverse/Which/Internal.hs | bsd-3-clause | 35,112 | 0 | 16 | 7,779 | 7,777 | 4,273 | 3,504 | 434 | 3 |
module Language.Iso.AST where
import Language.Iso.App
import Language.Iso.Fls
import Language.Iso.Ite
import Language.Iso.Lam
import Language.Iso.Tru
import Language.Iso.Var
import qualified Data.Set as S
data AST = VAR String
| LAM String AST
| APP AST AST
deriving (... | joneshf/iso | src/Language/Iso/AST.hs | bsd-3-clause | 1,705 | 0 | 11 | 521 | 849 | 431 | 418 | 52 | 2 |
{-# LANGUAGE CPP, BangPatterns, DoAndIfThenElse, RecordWildCards #-}
{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
------------------------------------------------------------------------------
-- |
-- Module: Database.PostgreSQL.Simple.Internal
-- Copyright: (c) 2011-2012 Leon P Smit... | avieth/postgresql-simple | src/Database/PostgreSQL/Simple/Internal.hs | bsd-3-clause | 19,030 | 0 | 19 | 5,750 | 3,121 | 1,654 | 1,467 | 314 | 13 |
-- * Manipulation functions for cabal versions and version ranges
{-# LANGUAGE
TypeOperators
, TemplateHaskell
#-}
module Version where
import Data.Label
import Distribution.Text
import Distribution.Version
$(mkLabels [''Version])
$(mkLabels [''VersionRange])
-- | Function to bump the nth position in a versi... | silkapp/bumper | src/Version.hs | bsd-3-clause | 2,092 | 0 | 18 | 649 | 662 | 352 | 310 | 57 | 4 |
{-# OPTIONS -Wall #-}
{-# LANGUAGE TypeSynonymInstances, FlexibleContexts #-}
module PushdownAutomaton.Models.PDA1 (
mach, mach2
) where
import Basic.Types
import Basic.Memory
import Basic.MemoryImpl --(StackMem, ListMem, fillMem, Address(..))
import PushdownAutomaton.Operations
import PushdownAutomaton.State
imp... | davidzhulijun/TAM | PushdownAutomaton/Models/PDA1.hs | bsd-3-clause | 2,202 | 0 | 12 | 330 | 682 | 386 | 296 | 40 | 1 |
module Provisioning where
import TPM
import Demo3Shared
import System.IO
import Data.Word
import Data.Binary
goldenFileName :: String
goldenFileName= "goldenPcrComposite.txt"
readComp :: IO TPM_PCR_COMPOSITE
readComp = do
handle <- openFile goldenFileName ReadMode
compString <- hGetLine handle
let comp :: T... | armoredsoftware/protocol | tpm/mainline/provisioning/Provisioning.hs | bsd-3-clause | 1,037 | 0 | 10 | 274 | 276 | 134 | 142 | 31 | 1 |
module Main where
import System.IO
import qualified Media.MpegTs.Packet as P
import Options.Applicative
import qualified Data.ByteString as BS
{-
Data type to hold the command line optio
-}
data Options = Options { input :: String
, verbose :: Bool
} deriving Show
{-
Opt... | kevinkirkup/mpegts-hs | app/Main.hs | bsd-3-clause | 1,236 | 0 | 22 | 331 | 323 | 167 | 156 | 32 | 1 |
{-# LANGUAGE PatternSynonyms #-}
-- | Very simple and inefficient interpreter of Unison terms
module Unison.Eval.Interpreter where
import Data.Map (Map)
import Debug.Trace
import Unison.Eval
import Unison.Term (Term)
import Unison.Var (Var)
import qualified Data.Map as M
import qualified Unison.Reference as R
import q... | CGenie/platform | node/src/Unison/Eval/Interpreter.hs | mit | 1,841 | 0 | 18 | 522 | 748 | 372 | 376 | 44 | 10 |
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Q... | plow-technologies/persistent | persistent-test/src/Recursive.hs | mit | 1,268 | 0 | 16 | 220 | 257 | 136 | 121 | 26 | 1 |
module Tiny ( resource, resource_dyn ) where
import API
import Data.Dynamic
resource = tiny {
field = "hello strange world"
}
resource_dyn :: Dynamic
resource_dyn = toDyn resource
| abuiles/turbinado-blog | tmp/dependencies/hs-plugins-1.3.1/testsuite/make/simple/Tiny.hs | bsd-3-clause | 196 | 0 | 6 | 44 | 46 | 28 | 18 | 7 | 1 |
{-# LANGUAGE RecordWildCards #-}
parseArgs =
Args
{ equalProb = E `elem` opts
, ..
}
| mpickering/ghc-exactprint | tests/examples/ghc710/RecordWildcard.hs | bsd-3-clause | 113 | 0 | 7 | 44 | 24 | 15 | 9 | 5 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Halfs.Protection(
UserID (..)
, GroupID(..)
, rootUser
, rootGroup
)
where
import Data.Serialize
import Data.Word
newtype UserID = UID Word64
deriving (Show, Eq, Real, Enum, Integral, Num, Ord)
instance Serialize UserID wher... | hackern/halfs | Halfs/Protection.hs | bsd-3-clause | 659 | 0 | 8 | 167 | 216 | 121 | 95 | 22 | 1 |
-- Copyright (c) 2014-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is distributed under the terms of a BSD license,
-- found in the LICENSE file.
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE S... | facebook/Haxl | tests/SleepDataSource.hs | bsd-3-clause | 1,188 | 0 | 9 | 188 | 253 | 140 | 113 | -1 | -1 |
import qualified Data.List as L
import qualified Data.Map.Strict as M
solve :: String -> String -> String
solve x y = if length before_last == 0 then "-1"
else foldr (\a b -> a ++ " " ++ b) "" before_last
where wx = map (\s -> read s :: Int) (L.words x)
n = wx !! 0
k = wx !! 1
... | EdisonAlgorithms/HackerRank | practice/fp/recursion/filter-elements/filter-elements.hs | mit | 892 | 0 | 14 | 376 | 364 | 192 | 172 | 22 | 4 |
{- |
Module : Data.UUID.V3
Copyright : (c) 2010,2012 Antoine Latter
License : BSD-style
Maintainer : aslatter@gmail.com
Stability : experimental
Portability : portable
NOTE: This module uses MD5 hashing. Unless you know
you need to use this module, you should probably be
using "Data.UUID.V5", which off... | alphaHeavy/uuid | Data/UUID/V3.hs | bsd-3-clause | 1,279 | 0 | 7 | 258 | 99 | 65 | 34 | 14 | 1 |
module Codec.Base64 (encode, decode) where
import Data.Array.Unboxed
import Data.Bits
import Data.Char
import Data.Word
-- |
-- Base64 encoding.
--
-- >>> encode "foo bar"
-- "Zm9vIGJhcg=="
--
-- prop> decode (encode xs) == xs
encode :: String -> String
encode = map (base64array !) . encode' . map (fromIntegral . ord... | arowM/unit-test-bin-example | src/Codec/Base64.hs | bsd-3-clause | 2,210 | 0 | 10 | 613 | 1,202 | 684 | 518 | 53 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Hadrian.Haskell.Cabal.Type
-- Copyright : (c) Andrey Mokhov 2014-2018
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
--
-- Data types for storing basic Has... | sdiehl/ghc | hadrian/src/Hadrian/Haskell/Cabal/Type.hs | bsd-3-clause | 3,284 | 0 | 10 | 874 | 470 | 297 | 173 | 49 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-
Copyright (C) 2006-2015 John MacFarlane <jgm@berkeley.edu>
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) a... | gbataille/pandoc | src/Text/Pandoc/Writers/Native.hs | gpl-2.0 | 3,066 | 0 | 17 | 652 | 617 | 316 | 301 | 39 | 3 |
module Network.Wai.Session.TokyoCabinet (tokyocabinetStore, tokyocabinetStore_) where
import Control.Monad
import Data.ByteString (ByteString)
import Control.Monad.IO.Class (liftIO, MonadIO)
import Network.Wai.Session (Session, SessionStore, genSessionId)
import Control.Error (hush)
import qualified Data.ByteString as... | singpolyma/wai-session-tokyocabinet | Network/Wai/Session/TokyoCabinet.hs | isc | 1,444 | 19 | 16 | 238 | 458 | 251 | 207 | 25 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiWayIf #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
-- http://localhost:8001/
-- type 'q' in terminal to quit server
module Web.Play.Server where
import ... | tonyday567/web-play | src/Web/Play/Server.hs | mit | 3,126 | 0 | 14 | 766 | 1,189 | 593 | 596 | 103 | 1 |
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings, TupleSections, LambdaCase #-}
module CustomTags where
import Data.Char
import Data.Monoid
import qualified Data.Set as S
import Hakyll
import Text.Pandoc.Option... | holdenlee/philosophocle | src/CustomTags.hs | mit | 1,783 | 0 | 15 | 366 | 458 | 247 | 211 | 35 | 1 |
module Parser where
import Text.Parsec hiding (spaces)
import Text.Parsec.String (Parser)
import qualified Text.Parsec.Expr as Ex
import Lexer
import Expr
spaces = skipMany space >> skipMany newline
-- let x : int = 1 in x + 1 end
-- let f (x : int, y : int) : int = x + y in f 1 1 end
letin :: Parser Expr
letin = do... | tdidriksen/copatterns | src/findus/parser.hs | mit | 4,570 | 0 | 14 | 1,188 | 1,579 | 769 | 810 | 159 | 1 |
module HeatMapTest where
import Test.Hspec
import TestData
import HeatMap.PIFM
import Util.Utils
heatmap_tests = heat_point_tests
testHeatMap = blankHeatMap testState
heat_point_tests = describe "make sure point heating works" $ do
it "test 1 point heats correctly" $ (getCost $ findTile (2,1) $ heatPoint testSt... | octopuscabbage/OctoVindiniumBots | test/HeatMapTest.hs | mit | 458 | 0 | 14 | 76 | 139 | 75 | 64 | 10 | 1 |
--import Control.Parallel
-- main = a `par` b `par` c `pseq` print (a + b + c)
-- where
-- a = ack 3 10
-- b = fac 42
-- c = fib 34
--fac 0 = 1
--fac n = n * fac (n-1)
--ack 0 n = n+1
--ack m 0 = ack(m-1) 1
--ack m n = ack (m-1 ) (ack m (n-1))
--fib 0 = 1
--fib 1 = 1
--fib n = fib(n -1) + fib(n-2)
import C... | super1ha1/haskell | src/function.hs | mit | 614 | 0 | 9 | 208 | 236 | 129 | 107 | 13 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module System.Process.BetterSpec (main, spec) where
import Test.Hspec
import System.IO
import System.IO.Silently
import System.Process.Better
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "readProcess" $ do
it "can be... | sol/better-process | test/System/Process/BetterSpec.hs | mit | 814 | 0 | 19 | 201 | 210 | 107 | 103 | 20 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Functor ((<$>))
import Data.List (isPrefixOf)
import Data.Monoid ((<>))
import Data.Text (pack, unpack, replace, empty)
import qualified Data.Set as S
import Text.Pandoc.Options
import Skylighti... | alvare/clrnds-blog | Main.hs | mit | 5,739 | 0 | 22 | 1,687 | 1,343 | 644 | 699 | 136 | 2 |
module SemiGroup13 where
import Data.Semigroup
import Test.QuickCheck hiding (Failure, Success)
import SemiGroupAssociativeLaw
import Test.QuickCheck.Gen (oneof)
import ArbitrarySum
import SemiGroup11
newtype AccumulateBoth a b =
AccumulateBoth (Validation a b)
deriving (Eq, Show)
instance (Semigroup a, Semi... | NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter15.hsproj/SemiGroup13.hs | mit | 1,083 | 0 | 13 | 192 | 414 | 211 | 203 | 23 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
module Static where
import CMark
import Data.FileEmbed
import Data.Text (Text)
import qualified Data.Text.Encoding as T
introHtml :: Text
introHtml = commonmarkToHtml [] $ T... | winterland1989/jsmServer | src/Static.hs | mit | 1,592 | 0 | 9 | 203 | 321 | 170 | 151 | 36 | 1 |
module GHCJS.DOM.SVGAnimatedNumberList (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/SVGAnimatedNumberList.hs | mit | 51 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
-- | Public Module
--
module Network.AWS.Wolf
( module Exports
) where
import Network.AWS.Wolf.Act as Exports
import Network.AWS.Wolf.Decide as Exports
import Network.AWS.Wolf.Prelude as Exports
| mfine/wolf | src/Network/AWS/Wolf.hs | mit | 205 | 0 | 4 | 34 | 42 | 32 | 10 | 5 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
module Main ( main ) where
import Graphics.Caramia
import Graphics.Caramia.Prelude hiding ( init )
import Graphics.UI.SDL
import Data.Bits
import Foreign.C.String
main :: IO ()
main =
withCString "smoke-test" $ \cstr -> do
_ <- init SDL_INIT_VIDEO
_ <- glSetAtt... | Noeda/caramia | demos/textures/Main.hs | mit | 3,576 | 0 | 19 | 1,213 | 718 | 430 | 288 | 117 | 1 |
{-
Paranoid Pirate Pattern queue in Haskell.
Uses heartbeating to detect crashed or blocked workers.
-}
module Main where
import System.ZMQ4.Monadic
import ZHelpers
import Control.Monad (when, forM_)
import Control.Applicative ((<$>))
import System.IO (hSetEncoding, stdout, utf8)
import Data.ByteString.Ch... | soscpd/bee | root/tests/zguide/examples/Haskell/ppqueue.hs | mit | 4,505 | 0 | 20 | 1,612 | 1,233 | 619 | 614 | 92 | 6 |
{-# LANGUAGE NoMonomorphismRestriction #-}
module Plugins.Gallery.Gallery.Manual56 where
import Diagrams.Prelude
-- c :: Diagram a R2
c = circle 5 # scaleX 2 # rotateBy (1/14) # lw 0.03
-- Generated by fair dice roll, guaranteed to be random
points = map p2 $
[ (0.8936218079179525,6.501173563301563)
... | andrey013/pluginstest | Plugins/Gallery/Gallery/Manual56.hs | mit | 1,541 | 0 | 12 | 413 | 376 | 220 | 156 | 31 | 2 |
module HTMLEntities.Prelude
(
module Exports,
)
where
-- base
-------------------------
import Control.Applicative as Exports hiding (WrappedArrow(..))
import Control.Arrow as Exports hiding (first, second)
import Control.Category as Exports
import Control.Concurrent as Exports
import Control.Exception as Exports
im... | nikita-volkov/html-entities | library/HTMLEntities/Prelude.hs | mit | 3,229 | 0 | 6 | 394 | 859 | 603 | 256 | 71 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-|
Game CUI implemented using [brick](https://github.com/jtdaugherty/brick/).
-}
module Game.H2048.UI.Brick
( main
) where
import Brick
import Brick.Widgets.Border
import Brick.Widgets.Center
import Data.Functor
import Data.List
import Data.String
import Graphics.Vty.Attrib... | Javran/h2048 | src/Game/H2048/UI/Brick.hs | mit | 3,817 | 0 | 19 | 1,230 | 1,229 | 639 | 590 | 106 | 4 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-crawler.html
module Stratosphere.Resources.GlueCrawler where
import Stratosphere.ResourceImports
import S... | frontrowed/stratosphere | library-gen/Stratosphere/Resources/GlueCrawler.hs | mit | 5,384 | 0 | 15 | 678 | 988 | 562 | 426 | 75 | 1 |
{-# LANGUAGE OverloadedStrings, RecordWildCards, FlexibleInstances, CPP #-}
module DumpFormat
( DumpFormat(..)
, readDumpFormat
, dumpActivity
, dumpSample
, dumpSamples
) where
import Data.MyText (unpack, null, pack, Text)
import Data.Aeson
import qualified Data.ByteString.Lazy as LBS
import D... | nomeata/darcs-mirror-arbtt | src/DumpFormat.hs | gpl-2.0 | 3,925 | 0 | 13 | 1,073 | 1,256 | 635 | 621 | 108 | 4 |
{-# OPTIONS_GHC -fglasgow-exts -fffi #-}
module Fenfire.Irc2Notetaker where
-- Copyright (c) 2006-2007, Benja Fallenstein, Tuukka Hastrup
-- This file is part of Fenfire.
--
-- Fenfire is free software; you can redistribute it and/or modify it under
-- the terms of the GNU General Public License as published by
-- th... | timthelion/fenfire | Fenfire/Irc2Notetaker.hs | gpl-2.0 | 6,824 | 0 | 20 | 2,005 | 2,119 | 1,127 | 992 | 109 | 4 |
{-# LANGUAGE TypeFamilies #-}
-----------------------------------------------------------------------------
-- |
-- Module : Numerical.PETSc.Apps.FEM
-- Copyright : (c) Marco Zocca 2015
-- License : LGPL3
-- Maintainer : zocca . marco . gmail . com
-- Stability : experimental
--
-- | Application : Fi... | ocramz/petsc-hs | src/Numerical/PETSc/Apps/FEM.hs | gpl-3.0 | 531 | 0 | 4 | 87 | 29 | 25 | 4 | 3 | 0 |
module Torrent where
import Files
import Files.MMap
import MetaInfo
import Peer.Connection
import Peer.Env
import Tracker
import Torrent.Env
import HTorrentPrelude
import Data.Array
import qualified Data.ByteString as BS
import Network.Socket
import System.Random
splitPieces :: ByteString -> [ByteString]
splitPieces... | ian-mi/hTorrent | Torrent.hs | gpl-3.0 | 1,466 | 0 | 15 | 406 | 497 | 261 | 236 | -1 | -1 |
{- Copyright 2012 Dustin DeWeese
This file is part of peg.
peg 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 License, or
(at your option) any later version.
peg i... | HackerFoo/peg | Peg/Parse.hs | gpl-3.0 | 3,803 | 0 | 16 | 1,159 | 1,420 | 730 | 690 | -1 | -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 | source/Game/Grid/Output/Fancy/ShadeSpace.hs | gpl-3.0 | 2,743 | 0 | 11 | 550 | 612 | 311 | 301 | 42 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.CloudTrace.Types
-- Copyright : (c) 2015-2016 Brendan ... | brendanhay/gogol | gogol-cloudtrace/gen/Network/Google/CloudTrace/Types.hs | mpl-2.0 | 3,814 | 0 | 7 | 1,023 | 456 | 314 | 142 | 122 | 1 |
{-
Copyright (C) 2011, 2012 Jeroen Ketema
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed i... | jeroenk/iTRSsVisualised | DrawMouseSquare.hs | agpl-3.0 | 3,999 | 0 | 14 | 917 | 877 | 480 | 397 | 49 | 3 |
{-# LANGUAGE GADTs #-}
import DNA.Actor
import DNA.AST
import DNA
import DNA.Compiler.CH
----------------------------------------------------------------
-- Print actor
----------------------------------------------------------------
exprPrint :: Expr () (() -> Int -> ((),Out))
exprPrint = Lam $ Lam $ Tup ( Scalar ()... | SKA-ScienceDataProcessor/RC | MS1/dna-examples/test.hs | apache-2.0 | 1,181 | 4 | 13 | 255 | 408 | 206 | 202 | 31 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Openshift.V1.OAuthAuthorizeTokenList where
import GHC.Generics
import Data.Text
import Openshift.Unversioned.ListMeta
import Openshift.V1.OAuth... | minhdoboi/deprecated-openshift-haskell-api | openshift/lib/Openshift/V1/OAuthAuthorizeTokenList.hs | apache-2.0 | 1,280 | 0 | 9 | 174 | 125 | 77 | 48 | 19 | 0 |
{-|
Copyright : (C) 2012-2016, University of Twente
License : BSD2 (see the file LICENSE)
Maintainer : Christiaan Baaij <christiaan.baaij@gmail.com>
Utilities for converting Core Type/Term to Netlist datatypes
-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ViewPatterns #-}
module CLaSH.Netlist.Ut... | ggreif/clash-compiler | clash-lib/src/CLaSH/Netlist/Util.hs | bsd-2-clause | 15,044 | 242 | 21 | 4,946 | 3,993 | 2,144 | 1,849 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableSuperClasses #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGU... | luke-clifton/memorable-bits | src/Data/Memorable/Internal.hs | bsd-2-clause | 31,891 | 187 | 91 | 9,376 | 11,860 | 6,213 | 5,647 | -1 | -1 |
{-|
Module: NLP.Dictionary.StarDict.Regular
Copyright: (c) 2016 Al Zohali
License: BSD3
Maintainer: Al Zohali <zohl@fmap.me>
Stability: experimental
= Description
Tools for StarDict dictionaries.
Every call of 'getEntries' will perform file reading operation to
retrieve requested data. ... | zohl/dictionaries | src/NLP/Dictionary/StarDict/Regular.hs | bsd-3-clause | 2,479 | 0 | 15 | 419 | 582 | 334 | 248 | 46 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module UnitB.FunctionTable.Spec.LaTeX where
import Control.Lens
import Control.Monad.Writer
import Control.Precondition
import Data.List as L
import Data.Text hiding (toUpper)
import Text.LaTeX as T hiding (tex,(&))
import qualified T... | unitb/logic-function-tables | src/UnitB/FunctionTable/Spec/LaTeX.hs | bsd-3-clause | 4,478 | 0 | 19 | 1,421 | 1,456 | 738 | 718 | -1 | -1 |
module Main (main) where
import Control.Applicative
import Data.Maybe
import Data.SemVer.Range
import Test.Tasty
import Test.Tasty.QuickCheck as QC
infixr 0 `to`
to :: a -> b -> (a, b)
to a b = (a, b)
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests = testGroup "Tests" [properties]
properties :: Tes... | phadej/semver-range | test/Tests.hs | bsd-3-clause | 3,225 | 0 | 11 | 613 | 960 | 554 | 406 | 79 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module LLVMFrontend.Helpers where
import Data.ByteString.Short
import Control.Monad.State
import LLVM.AST
import LLVM.AST.Type
import LLVM.AST.Global
import qualified LLVM.AST as AST
import qualified LLVM.AST.Linkage as LL
import qualified LLVM.AST.Attribute... | LouisJenkinsCS/Minimal-JVM | LLVMFrontend/Helpers.hs | bsd-3-clause | 3,413 | 0 | 9 | 759 | 1,077 | 594 | 483 | 75 | 1 |
module Client.Quote where
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.Resource
import qualified Data.ByteString.Char8 as BS
import Data.String
import Data.Conduit.Binary hiding (mapM_)
import Data.Conduit
import Finance.TradeKing
import System.IO
doQuote :: [String] -> TradeKingAp... | tathougies/hstradeking | client/Client/Quote.hs | bsd-3-clause | 968 | 0 | 21 | 267 | 335 | 173 | 162 | 28 | 2 |
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Network.TLS.Packet
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- the Packet module contains everything necessary to serialize and deserialize things
-- with only explic... | tolysz/hs-tls | core/Network/TLS/Packet.hs | bsd-3-clause | 27,524 | 292 | 21 | 6,537 | 6,460 | 3,277 | 3,183 | 512 | 11 |
module H99.MultiwayTreesSpec (spec) where
import H99.MultiwayTrees
import Test.Hspec
tree1 = Node 'a' []
tree2 = Node 'a' [Node 'b' []]
tree3 = Node 'a' [Node 'b' [Node 'c' []]]
tree4 = Node 'b' [Node 'd' [], Node 'e' []]
tree5 = Node 'a' [
Node 'f' [Node 'g' []],
... | 1yefuwang1/haskell99problems | test/H99/MultiwayTreesSpec.hs | bsd-3-clause | 2,035 | 0 | 18 | 666 | 560 | 267 | 293 | 45 | 1 |
{-# language CPP #-}
-- No documentation found for Chapter "BufferViewCreateFlags"
module Vulkan.Core10.Enums.BufferViewCreateFlags (BufferViewCreateFlags(..)) where
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showString)
import Numeric (showHex)
import Vu... | expipiplus1/vulkan | src/Vulkan/Core10/Enums/BufferViewCreateFlags.hs | bsd-3-clause | 1,924 | 0 | 10 | 360 | 305 | 184 | 121 | -1 | -1 |
module Interface where
import Data.List
import System.Process
import System.Exit
import Translate
import Parser
-- count parent to split source
splitSource :: String -> String -> [Int] -> [String]
splitSource "" res p = if l == r
then [res, ""]
else ["Error"]
where
l = head p
r = last p
splitSource t r... | ak1t0/Clover | src/Interface.hs | bsd-3-clause | 3,538 | 0 | 18 | 919 | 1,443 | 755 | 688 | 101 | 5 |
---------------------------------------------------------
--
-- Module : Fee
-- Copyright : Bartosz Wójcik (2010)
-- License : All rights reserved
--
-- Maintainer : bartek@sudety.it
-- Stability : Unstable
-- Portability : portable
--
-- This module implements idea of loan fee. Prov... | bartoszw/haslo | Haslo/Fee.hs | bsd-3-clause | 3,225 | 0 | 10 | 898 | 432 | 246 | 186 | 41 | 0 |
{-# LANGUAGE TupleSections #-}
module States.IntroRunning where
#include "Utils.cpp"
import Control.Applicative ((<$>))
import Data.Composition ((.:))
import qualified Graphics.GL as GL
import qualified Gamgine.Gfx as G
import Gamgine.Gfx ((<<<))
import qualified Gamgine.Font.GLF as GLF
import qualified Gamgine.State.... | dan-t/layers | src/States/IntroRunning.hs | bsd-3-clause | 2,010 | 0 | 20 | 431 | 638 | 358 | 280 | -1 | -1 |
-- | General tools for PowerPC programs.
module Language.PowerPC
( module Language.PowerPC.Simulator
) where
import Language.PowerPC.Simulator
| tomahawkins/powerpc | Language/PowerPC.hs | bsd-3-clause | 149 | 0 | 5 | 22 | 22 | 15 | 7 | 3 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Finance.Forex.YQL (YQLQuery(..)) where
import Finance.Forex.Types
import Control.Applicative
import Control.Monad
import Data.Aeson
import qualified Data.ByteString.Char8 as B
import Data.List
import qualified Data.Text ... | womfoo/forex | Finance/Forex/YQL.hs | bsd-3-clause | 1,823 | 0 | 13 | 567 | 501 | 280 | 221 | 42 | 1 |
module Math.Graphs where
import Control.Monad
import Control.Applicative
import Data.Monoid(Monoid,mempty,mappend)
import Data.List(union,(\\))
-- import qualified Data.ByteString.Char8 as B
-------------------------
-- general purpose graphs
-- no notion of vertex is necessary for general purpose graphs
data Edge ... | crvs/scythe | src/Math/Graphs.hs | bsd-3-clause | 3,095 | 0 | 13 | 724 | 1,546 | 796 | 750 | 66 | 1 |
module Problem20 where
factorial :: Integer -> Integer
factorial 1 = 1
factorial n = n * (factorial $ n-1)
digitSum :: Integer -> Integer
digitSum 0 = 0
digitSum n = (n `mod` 10) + (digitSum $ n `div` 10)
main :: IO ()
main =
putStrLn . show $ digitSum $ factorial 100
| noraesae/euler | src/Problem20.hs | bsd-3-clause | 274 | 0 | 8 | 60 | 125 | 68 | 57 | 10 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
module Web.Spock.Internal.SessionVaultSpec (spec) where
import Web.Spock.Internal.SessionVault
import Control.Concurrent.STM
import Test.Hspec
data DummySession
= DummySession
{ ds_key :: Int
, ds_value :: Int
} deriving (Show, Eq... | nmk/Spock | test/Web/Spock/Internal/SessionVaultSpec.hs | bsd-3-clause | 1,703 | 0 | 16 | 519 | 461 | 232 | 229 | 39 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
-- |
-- Module: Data.Aeson.Types
-- Copyright: (c) 2011-2016 Bryan O'Sullivan
-- (c) 2011 MailRank, Inc.
-- License: BSD3
-- Maintainer: Bryan O'Sullivan <bos@serpentine.com>
-- Stability: experimental
-- Portability: portable
--
-- Types for working with JS... | dmjio/aeson | src/Data/Aeson/Types.hs | bsd-3-clause | 3,389 | 0 | 7 | 945 | 536 | 370 | 166 | 126 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Auth.DbAuth where
import Data.Text
import Database.Persist.MySQL
import Database.Persist.Sql
import Control.Monad.IO.Class
import Control.Monad.Trans.Either
import Servant.API
import Servant
import Auth.AuthHeader
import Db.Common
import qualified Db.User as Db
import qualif... | dbushenko/trurl | devrepo/servant/src/Auth/DbAuth.hs | bsd-3-clause | 1,428 | 0 | 14 | 298 | 437 | 227 | 210 | 33 | 2 |
module Ransac.Common where
import qualified Data.Vector as V
import qualified Data.Vector.Generic as G
import Data.Maybe
import Data.List
import Control.Monad.Random
type FittingFunction ps model = ps -> Maybe model
data Result m p c = Result { rModel :: m, rPoints :: p, rCost :: c... | fhaust/rt-ransac | src/Ransac/Common.hs | bsd-3-clause | 1,718 | 0 | 13 | 489 | 610 | 315 | 295 | 29 | 2 |
{-# LANGUAGE OverloadedStrings, NoImplicitPrelude, NoRecordWildCards, DeriveGeneric #-}
module Keter.Node.Internal
(
defaultKeterConfig
,simpleWatcher
, defaultPaths
, sampleBundleConfig
, activeNodes
, tmpFilePath
, nodeTypeFilePath
) where
-- Control
import CorePrelude
-- impor... | plow-technologies/keter-node | src/Keter/Node/Internal.hs | bsd-3-clause | 4,487 | 0 | 14 | 1,177 | 666 | 403 | 263 | 87 | 1 |
{-# LANGUAGE BangPatterns, CPP, MagicHash, NondecreasingIndentation #-}
{-# OPTIONS_GHC -fprof-auto-top #-}
-------------------------------------------------------------------------------
--
-- | Main API for compiling plain Haskell source code.
--
-- This module implements compilation of a Haskell source. It is
-- /n... | olsner/ghc | compiler/main/HscMain.hs | bsd-3-clause | 72,747 | 0 | 27 | 21,699 | 12,094 | 6,153 | 5,941 | 1,037 | 10 |
module System.Win32.DHCP.IP_RANGE
( IP_RANGE (..)
) where
import Data.Ip
import Import
data IP_RANGE = IP_RANGE !Ip !Ip
instance Storable IP_RANGE where
sizeOf _ = 8
alignment _ = 1
peek ptr = IP_RANGE
<$> (peek . castPtr) ptr
<*> castPtr ptr `peekByteOff` 4
poke ptr (IP_RANGE start end) ... | mikesteele81/Win32-dhcp-server | src/System/Win32/DHCP/IP_RANGE.hs | bsd-3-clause | 439 | 0 | 11 | 119 | 151 | 78 | 73 | 19 | 0 |
-- | <http://strava.github.io/api/v3/comments/>
module Strive.Actions.Comments
( getActivityComments
) where
import Network.HTTP.Types (toQuery)
import Strive.Aliases (ActivityId, Result)
import Strive.Client (Client)
import Strive.Internal.HTTP (get)
import Strive.Options (GetActivityCommentsOptions)
import Striv... | liskin/strive | library/Strive/Actions/Comments.hs | mit | 680 | 0 | 11 | 75 | 153 | 87 | 66 | 12 | 1 |
{-|
hledger's cmdargs modes parse command-line arguments to an
intermediate format, RawOpts (an association list), rather than a
fixed ADT like CliOpts. This allows the modes and flags to be reused
more easily by hledger commands/scripts in this and other packages.
-}
module Hledger.Data.RawOptions (
RawOpts,
se... | ony/hledger | hledger-lib/Hledger/Data/RawOptions.hs | gpl-3.0 | 1,702 | 0 | 16 | 322 | 463 | 252 | 211 | 37 | 2 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies
, TypeSynonymInstances, FlexibleInstances, UndecidableInstances
, OverlappingInstances #-}
-----------------------------------------------------------
-- |
-- Module : HDBRec
-- Copyright : HWT Group (c) 2003, haskelldb-users@lists.sourceforge.net... | m4dc4p/haskelldb | src/Database/HaskellDB/HDBRec.hs | bsd-3-clause | 7,580 | 44 | 13 | 1,835 | 2,329 | 1,245 | 1,084 | -1 | -1 |
module Blub
( blub
, foo
, bar
) where
import Data.Text (Text)
import Data.Maybe (Maybe(Nothing, Just))
| jystic/hsimport | tests/goldenFiles/SymbolTest25.hs | bsd-3-clause | 116 | 0 | 6 | 29 | 41 | 27 | 14 | 6 | 0 |
solveMeFirst a b = a + b
main = do
val1 <- readLn
val2 <- readLn
let sum = solveMeFirst val1 val2
print sum
| icot/hackerrank | template1.hs | gpl-3.0 | 125 | 0 | 10 | 41 | 54 | 24 | 30 | 6 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.UserHooks
-- Copyright : Isaac Jones 2003-2005
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- This defines the API that @Setup.hs@ scripts can use to customise the w... | jwiegley/ghc-release | libraries/Cabal/cabal/Distribution/Simple/UserHooks.hs | gpl-3.0 | 11,503 | 0 | 15 | 2,487 | 1,608 | 931 | 677 | 110 | 1 |
{-
Copyright 2015 Google Inc. All rights reserved.
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 a... | Ye-Yong-Chi/codeworld | codeworld-base/src/GHC/Float/ConversionUtils.hs | apache-2.0 | 765 | 0 | 4 | 136 | 25 | 19 | 6 | 4 | 0 |
module Main where
import Happstack.Server
import Control.Monad
{-
interesting urls:
/setcookie/value
/setcookie/hello+world
-}
data MyStructure = MyStructure String
instance FromData MyStructure where
fromData = do str <- lookCookieValue "cookie"
return $ MyStructure str
main :: IO ()
m... | erantapaa/happstack-server | attic/Examples/set/FromData/Cookies.hs | bsd-3-clause | 783 | 0 | 17 | 286 | 169 | 83 | 86 | 17 | 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="sk-SK">
<title>>Run Applications | ZAP Extensions</title>
<maps>
<homeID>top</homeID>
... | thc202/zap-extensions | addOns/invoke/src/main/javahelp/org/zaproxy/zap/extension/invoke/resources/help_sk_SK/helpset_sk_SK.hs | apache-2.0 | 982 | 76 | 55 | 159 | 419 | 211 | 208 | -1 | -1 |
module Where1 where
f3 :: Num t => t -> (t, t)
f3 x
= (ls, rs)
where
ls = x + 1
rs = x - 1
f1 :: Int -> Int
f1 x = ls
where
ls = x + 1
f2 :: Int -> Int
f2 x = rs
where
rs = x - 1 | kmate/HaRe | old/testing/merging/Where1_TokOut.hs | bsd-3-clause | 244 | 0 | 7 | 123 | 116 | 64 | 52 | 12 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Text.Parsec.Combinator
-- Copyright : (c) Daan Leijen 1999-2001, (c) Paolo Martini 2007
-- License : BSD-style (see the LICENSE file)
--
-- Maintainer : derek.a.elkins@gmail.com
-- Stability : provisional
... | 23Skidoo/parsec | Text/Parsec/Combinator.hs | bsd-2-clause | 10,619 | 0 | 12 | 3,449 | 2,176 | 1,160 | 1,016 | 82 | 1 |
module RuleDefiningPlugin where
import GhcPlugins
{-# RULES "unsound" forall x. show x = "SHOWED" #-}
plugin :: Plugin
plugin = defaultPlugin
| siddhanathan/ghc | testsuite/tests/plugins/rule-defining-plugin/RuleDefiningPlugin.hs | bsd-3-clause | 145 | 0 | 4 | 24 | 18 | 12 | 6 | 5 | 1 |
{-# LANGUAGE Unsafe #-}
module UnsafeInfered09_B where
f :: Int
f = 1
| ghc-android/ghc | testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09_B.hs | bsd-3-clause | 72 | 0 | 4 | 15 | 15 | 10 | 5 | 4 | 1 |
module Mod124_A where
data T = T
| urbanslug/ghc | testsuite/tests/module/Mod124_A.hs | bsd-3-clause | 34 | 0 | 5 | 8 | 11 | 7 | 4 | 2 | 0 |
-- Pattern synonyms
{-# LANGUAGE PatternSynonyms #-}
module Main where
pattern Single x y = [(x,y)]
foo [] = 0
foo [(True, True)] = 1
foo (Single True True) = 2
foo (Single False False) = 3
foo _ = 4
main = mapM_ (print . foo) tests
where
tests = [ [(True, True)]
... | urbanslug/ghc | testsuite/tests/patsyn/should_run/match.hs | bsd-3-clause | 445 | 0 | 9 | 182 | 172 | 99 | 73 | 14 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
... | jcgruenhage/dendrite | vendor/src/github.com/apache/thrift/lib/hs/src/Thrift/Transport/Empty.hs | apache-2.0 | 1,240 | 0 | 8 | 234 | 136 | 81 | 55 | 13 | 0 |
module Futhark.CodeGen.SetDefaultSpace
( setDefaultSpace
)
where
import Futhark.CodeGen.ImpCode
-- | Set all uses of 'DefaultSpace' in the given functions to another memory space.
setDefaultSpace :: Space -> Functions op -> Functions op
setDefaultSpace space (Functions fundecs) =
Functions [ (f... | ihc/futhark | src/Futhark/CodeGen/SetDefaultSpace.hs | isc | 3,665 | 0 | 9 | 695 | 1,281 | 627 | 654 | 86 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Strict #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeFamilies #-}
-- | Conversion of a monomorphic, first-order, defunctorised source
-- program to a core Futhark program.
module Futhark.Internalise.Exps (transformProg) where
impo... | HIPERFIT/futhark | src/Futhark/Internalise/Exps.hs | isc | 87,807 | 699 | 39 | 23,449 | 21,703 | 11,818 | 9,885 | 1,947 | 59 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UnicodeSyntax #-}
-- |
-- Module: Tests.BoolOption
-- Description: Tests for 'boolOption' and 'boolOption_'
-- Copyright: Copyright © 2015... | alephcloud/hs-configuration-tools | test/Tests/BoolOption.hs | mit | 6,569 | 0 | 20 | 1,753 | 2,303 | 1,216 | 1,087 | 143 | 1 |
module Example18 where
import qualified WeightedLPA as WLPA
import Graph
import qualified Data.Map as M
import qualified Data.Set as S
import Data.Matrix
weighted_graph_E :: WeightedGraph String String
weighted_graph_E = WeightedGraph (buildGraphFromEdges [("e",("v","v")),("f",("v","v"))]) (M.fromList [("e",1),("f",... | rzil/honours | LeavittPathAlgebras/Example18.hs | mit | 1,877 | 0 | 13 | 308 | 996 | 540 | 456 | 40 | 1 |
import qualified Text.PrettyPrint.Boxes as B
import Text.PrettyPrint.Boxes (Box, Alignment)
import Text.Parsec
import Text.Parsec.Text (Parser)
import qualified Data.Text.IO as IO
import Control.Applicative ((*>), (<*))
import Data.Monoid
import System.Environment (getArgs)
main = do
[infile] <- getArgs
conten... | devonhollowood/dailyprog | 2015-06-05/latex.hs | mit | 3,437 | 0 | 14 | 898 | 1,294 | 635 | 659 | 97 | 2 |
import MinHS.Parse
import MinHS.Syntax
import MinHS.TypeChecker
import MinHS.Pretty
import MinHS.Evaluator
import Control.Monad
import Data.Either
import Options.Applicative
import Text.PrettyPrint.ANSI.Leijen (Pretty (..),Doc, putDoc, plain)
type Action a b = a -> Either (IO ()) b
main = execParser argsInfo >>= mai... | pierzchalski/cs3161a1 | Main.hs | mit | 2,489 | 0 | 16 | 873 | 733 | 375 | 358 | 43 | 5 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.WebKitNamespace
(js_getMessageHandlers, getMessageHandlers, WebKitNamespace,
castToWebKitNamespace, gTypeWebKitNamespace)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Doubl... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/WebKitNamespace.hs | mit | 1,549 | 6 | 11 | 210 | 377 | 238 | 139 | 27 | 1 |
-- Copyright 2015 Ian D. Bollinger
--
-- Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-- http://www.apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT
-- or http://opensource.org/licenses/MIT>, at your option. This file may not be
-- copied, modified, or distributed except according t... | ianbollinger/nomegen | gui/Main.hs | mit | 4,342 | 0 | 18 | 927 | 1,171 | 580 | 591 | 104 | 2 |
module TwentySix where
import Control.Monad (liftM)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Monad.Trans.Class (MonadTrans, lift)
-- Exercises: EitherT
newtype EitherT e m a =
EitherT { runEitherT :: m (Either e a) }
-- 1
instance Functor m => Functor (EitherT e m) where
fmap f (EitherT me)... | mudphone/HaskellBook | src/TwentySix.hs | mit | 6,127 | 0 | 14 | 1,711 | 2,487 | 1,291 | 1,196 | 154 | 2 |
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : Linux.Parser.Internal.Proc
Descripition : Parsers for the /proc vfs.
The examples below use the __io-streams__ library.
-}
module Linux.Parser.Internal.Proc
( -- * Data Types
-- ** MappedMe... | wayofthepie/sip | src/Linux/Parser/Internal/Proc.hs | mit | 19,407 | 0 | 56 | 4,656 | 3,009 | 1,780 | 1,229 | 293 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.