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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE DeriveDataTypeable #-}
module ViperVM.VirtualPlatform.Object (
Object(..), ObjectPeer(..), initObject, directTransfer,
initSubObject,
lockObject, unlockObject,
lockObjectIO, unlockObjectIO
) where
import ViperVM.Platform.Memory
import ViperVM.Platform.Link
import ViperVM.VirtualPlatform.Objec... | hsyl20/HViperVM | lib/ViperVM/VirtualPlatform/Object.hs | lgpl-3.0 | 2,301 | 0 | 11 | 480 | 672 | 352 | 320 | 62 | 3 |
import Text.Printf
log2 k n x =
if n > x
then k-1
else log2 (k+1) (2*n) x
ans x =
let l2 = log2 0 1 x
in
if 2^(l2+1) - 1 == x
then l2+1
else l2
main = do
x <- fmap read getLine :: IO Int
let o = ans x
print o
| a143753/AOJ | 3027.hs | apache-2.0 | 243 | 0 | 12 | 91 | 153 | 76 | 77 | 14 | 2 |
{-
Copyright 2019 The CodeWorld Authors. 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 applicab... | pranjaltale16/codeworld | codeworld-account/src/CodeWorld/Account/Actions.hs | apache-2.0 | 7,156 | 0 | 17 | 2,272 | 1,598 | 839 | 759 | 137 | 5 |
module Programs (
correctPrograms,
typeIncorrectPrograms,
incorrectPrograms
) where
correctPrograms :: [String]
correctPrograms = [
"program hello in Haskell",
"platform x64-windows",
"platform x86",
"interpreter hugs for Haskell in i686-windows",
"compiler uuagc from UUAG to Haskel... | aochagavia/CompilerConstruction | tdiagrams/test/Programs.hs | apache-2.0 | 1,948 | 0 | 5 | 393 | 125 | 84 | 41 | 31 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QHttp.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:31
Warning : this file is machine generated - do not mod... | uduki/hsQt | Qtc/Network/QHttp.hs | bsd-2-clause | 23,271 | 0 | 16 | 4,260 | 8,137 | 4,153 | 3,984 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -Wall -fno-warn-orphans #-}
----------------------------------------------------------... | kfish/zoom-cache-pcm | Data/ZoomCache/PCM/IEEE754.hs | bsd-2-clause | 9,367 | 0 | 10 | 2,398 | 973 | 564 | 409 | 125 | 1 |
-- Read-Eval-Print loop for LambdaQuest.Finter
module Main where
import LambdaQuest.Finter
import LambdaQuest.Finter.Parse
import LambdaQuest.Finter.PrettyPrint
import LambdaQuest.Finter.Type
import LambdaQuest.Finter.TypeCheck (typeOf)
import LambdaQuest.Finter.Eval (termShift,termTypeSubst,eval1,ValueBinding(..))
im... | minoki/LambdaQuest | src/Finter-repl.hs | bsd-3-clause | 5,076 | 0 | 28 | 1,477 | 1,569 | 746 | 823 | 115 | 9 |
{-# language CPP #-}
-- | = Name
--
-- VK_AMD_negative_viewport_height - device extension
--
-- == VK_AMD_negative_viewport_height
--
-- [__Name String__]
-- @VK_AMD_negative_viewport_height@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 36
--
-- [__Revision__]
--... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_AMD_negative_viewport_height.hs | bsd-3-clause | 3,905 | 0 | 8 | 783 | 205 | 159 | 46 | -1 | -1 |
module Evaluation
( eval
, liftThrows
, primitiveEnv
, bindVars)
where
import Data( LispVal(..)
, LispError(..)
, LispFunction
, IOLispFunction
, Env
, emptyEnv
, IOThrowsError
, liftThrows
)
import Control.Monad.Except(thr... | davideGiovannini/scheme-repl | src/Evaluation.hs | bsd-3-clause | 7,224 | 0 | 14 | 2,334 | 2,369 | 1,247 | 1,122 | 155 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module IrcScanner.KeywordIndexPage where
import IrcScanner.Types
--import IrcScanner.Index(getIState)
import Snap
import Snap.Snaplet.Heist
import Control.Lens
import Control.Monad.IO.Class(liftIO)
--import Control.Monad.Trans(lift)
import Control.Monad.... | redfish64/IrcScanner | src/IrcScanner/KeywordIndexPage.hs | bsd-3-clause | 1,353 | 0 | 18 | 270 | 333 | 181 | 152 | 29 | 1 |
{-# LANGUAGE CPP #-}
-- -fno-warn-deprecations for use of Map.foldWithKey
{-# OPTIONS_GHC -fno-warn-deprecations #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.PackageDescription.Configuration
-- Copyright : Thomas Schilling, 2007
-- License ... | Peaker/cabal | Cabal/Distribution/PackageDescription/Configuration.hs | bsd-3-clause | 26,545 | 0 | 20 | 7,210 | 6,254 | 3,379 | 2,875 | 371 | 19 |
module FunctionsExpr (
madd,
prefixadd,
msubtract,
mproduct,
mif,
mcharif,
mnot,
appendString,
concatenate,
firstInt,
tailInt,
msum
) where
madd :: Int -> Int -> Int
--Add 2 numbers
madd x y = undefined
prefixadd :: Int -> Int -> Int
prefixadd x y = (+) undefined un... | ajjaic/iit-workshop | src/FunctionsExpr.hs | bsd-3-clause | 1,452 | 0 | 7 | 332 | 361 | 211 | 150 | 39 | 2 |
module System.Hardware.Z21 (
module System.Hardware.Z21.Types
, module System.Hardware.Z21.Actions
) where
import System.Hardware.Z21.Types
import System.Hardware.Z21.Actions
| akru/z21-hs | src/System/Hardware/Z21.hs | bsd-3-clause | 185 | 0 | 5 | 24 | 39 | 28 | 11 | 5 | 0 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE CPP #-}
module Language.Sh.Arithmetic ( runMathParser ) where
-- This doesn't depend on any expansion at all...
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Language
import Text.ParserCombinators.Parsec.Expr
import qualified Text.ParserCombinators.Par... | shicks/shsh | Language/Sh/Arithmetic.hs | bsd-3-clause | 9,008 | 0 | 19 | 3,287 | 3,284 | 1,719 | 1,565 | 172 | 6 |
module Database.CQL.Protocol.Extra where
import Database.CQL.Protocol
( QueryParams(..)
, Consistency (One, LocalQuorum)
)
defQueryParams :: a -> QueryParams a
defQueryParams a = QueryParams One True a Nothing Nothing Nothing
defQueryParamsMeta :: a -> QueryParams a
defQueryParams... | onurzdg/clicklac | src/Database/CQL/Protocol/Extra.hs | bsd-3-clause | 384 | 0 | 6 | 86 | 98 | 55 | 43 | 8 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE FlexibleInstances #-}
module Web.Diamond.Types
where
import Data.Text(Text, pack, unpack)
import Data.... | jberthold/diamond | src/Web/Diamond/Types.hs | bsd-3-clause | 7,011 | 1 | 19 | 1,991 | 1,309 | 728 | 581 | 119 | 1 |
{-# LANGUAGE CPP, BangPatterns, RecordWildCards, DeriveDataTypeable, TupleSections #-}
-- | CommSec is a package that provides communication security for
-- use with Haskell sockets. Using an ephemeral shared
-- secret you can build contexts for sending or receiving data between one
-- or more peers.
--
-- Do not reus... | TomMD/commsec | Network/CommSec/Package.hs | bsd-3-clause | 13,050 | 0 | 32 | 3,470 | 3,466 | 1,791 | 1,675 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Opaleye.Trans
( OpaleyeT (..)
, runOpaleyeT
, -- * Transactions
Transaction
, transaction
, run
, -- * Queries
query
, queryFirst
, -... | WraithM/opaleye-trans | src/Opaleye/Trans.hs | bsd-3-clause | 5,461 | 0 | 12 | 1,444 | 1,309 | 705 | 604 | 84 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Answer (answer) where
{-
This module connects to a Database to find the answer.
-}
import Database.MySQL.Simple
answer :: IO Int
answer = do
conn <- connect defaultConnectInfo
[Only i] <- query_ conn "select 21 * 2"
return i
| aztecrex/haskell-scotty-spike | src/Answer.hs | bsd-3-clause | 276 | 0 | 9 | 53 | 64 | 33 | 31 | 8 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- -*-haskell-*-
-- GIMP Toolkit (GTK) CustomStore TreeModel
--
-- Author : Duncan Coutts, Axel Simon
--
-- Created: 11 Feburary 2006
--
-- Copyright (C) 2005-2016 Duncan Co... | gtk2hs/gi-gtk-hs | src/Data/GI/Gtk/ModelView/ForestStore.hs | lgpl-2.1 | 31,709 | 0 | 27 | 7,295 | 8,365 | 4,402 | 3,963 | 493 | 11 |
module Foundation
( App (..)
, Route (..)
, AppMessage (..)
, resourcesApp
, Handler
, Widget
, Form
, maybeAuth
, requireAuth
, module Settings
, module Model
, getExtra
) where
import Prelude
import Yesod
import Yesod.Static
import Yesod.Auth
import Yesod.Auth.Brow... | marcotmarcot/mini-scilab-site | Foundation.hs | bsd-2-clause | 6,065 | 0 | 17 | 1,316 | 836 | 469 | 367 | -1 | -1 |
--------------------------------------------------------------------------------
module Language.Haskell.Stylish.Step.UnicodeSyntax.Tests
( tests
) where
--------------------------------------------------------------------------------
import Test.Framework (Test, testGroup)
import... | silkapp/stylish-haskell | tests/Language/Haskell/Stylish/Step/UnicodeSyntax/Tests.hs | bsd-3-clause | 1,246 | 0 | 8 | 278 | 157 | 98 | 59 | 19 | 1 |
module Baum.Label
( label
, Order (..)
)
where
-- $Id$
import Baum.Type
import Baum.Order
import Baum.Traverse
import Control.Monad.State
-- | inlabel t cs = t'
-- such that (in)order t' = cs
-- and t' has same shape as t
label :: Order -> Term a b -> [ c ] -> Term d c
label o t cs = evalState ( work o t ) cs... | florianpilz/autotool | src/Baum/Label.hs | gpl-2.0 | 552 | 0 | 10 | 167 | 235 | 121 | 114 | 20 | 1 |
{- |
Module : $Header$
Description : static basic analysis for FPL
Copyright : (c) Christian Maeder, DFKI GmbH 2011
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : portable
basic static analysis for FPL
-}
module Fpl.StatAna
... | mariefarrell/Hets | Fpl/StatAna.hs | gpl-2.0 | 13,685 | 0 | 27 | 3,750 | 5,129 | 2,503 | 2,626 | 304 | 10 |
module Usage where
import qualified Definition as Def
test :: Int
test = D<caret>ef.seven + 1
| charleso/intellij-haskforce | tests/gold/codeInsight/QualifiedImport_QualifierResolves/Usage.hs | apache-2.0 | 97 | 0 | 7 | 19 | 34 | 21 | 13 | -1 | -1 |
module AST.Type where
import Control.Applicative ((<$>), (<*>))
import Data.Binary
import qualified Data.Map as Map
import qualified AST.Variable as Var
import AST.PrettyPrint
import qualified AST.Helpers as Help
import Text.PrettyPrint as P
data Type var
= Lambda (Type var) (Type var)
| Var String
| Typ... | avh4/elm-compiler | src/AST/Type.hs | bsd-3-clause | 4,312 | 0 | 22 | 1,546 | 1,697 | 855 | 842 | 112 | 6 |
{-# OPTIONS -w #-}
module Plugin.Free.Expr where
import Plugin.Free.Type
import Plugin.Free.Util
varInExpr :: Var -> Expr -> Bool
varInExpr v (EBuiltin _)
= False
varInExpr v (EVar v')
= v == v'
varInExpr v (EVarOp _ _ v')
= False
varInExpr v (EApp e1 e2)
= varInExpr v e1 || varInExpr ... | zeekay/lambdabot | Plugin/Free/Expr.hs | mit | 3,484 | 0 | 12 | 1,149 | 1,459 | 734 | 725 | 110 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.GHC.IPI642
-- Copyright : (c) The University of Glasgow 2004
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
{- All rights reserved.
Redistribution and use in source a... | jwiegley/ghc-release | libraries/Cabal/cabal/Distribution/Simple/GHC/IPI642.hs | gpl-3.0 | 6,703 | 0 | 11 | 1,519 | 1,011 | 596 | 415 | 98 | 1 |
{-# LANGUAGE RankNTypes, PolyKinds, TypeInType #-}
module TypeSkolEscape where
import GHC.Types
import GHC.Exts
type Bad = forall (v :: Levity) (a :: TYPE v). a
| nushio3/ghc | testsuite/tests/dependent/should_fail/TypeSkolEscape.hs | bsd-3-clause | 164 | 0 | 8 | 28 | 42 | 27 | 15 | -1 | -1 |
{-# LANGUAGE StandaloneKindSignatures #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PolyKinds, ExplicitForAll #-}
module SAKS_Fail018 where
import Data.Kind (Type)
data P w
-- j = k, x = a
type T :: forall k. forall (a :: k) -> Type
data T (x :: j) = MkT (P k) (P j) (P x) -- 'k' is not brought into scope... | sdiehl/ghc | testsuite/tests/saks/should_fail/saks_fail018.hs | bsd-3-clause | 344 | 0 | 8 | 69 | 83 | 52 | 31 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
-- | Construct a @Plan@ for how to build
module Stack.Build.ConstructPlan
( constr... | akhileshs/stack | src/Stack/Build/ConstructPlan.hs | bsd-3-clause | 22,010 | 0 | 27 | 7,062 | 5,633 | 2,834 | 2,799 | 480 | 9 |
module Foo.Bar where
baz1 = 6
| RefactoringTools/HaRe | test/testdata/cabal/cabal4/src/Foo/Bar.expected.hs | bsd-3-clause | 31 | 0 | 4 | 7 | 11 | 7 | 4 | 2 | 1 |
-- | POSIX time, if you need to deal with timestamps and the like.
-- Most people won't need this module.
module Data.Time.Clock.POSIX
(
posixDayLength,POSIXTime,posixSecondsToUTCTime,utcTimeToPOSIXSeconds,getPOSIXTime
) where
import Data.Time.Clock.UTC
import Data.Time.Calendar.Days
import Data.Fixed
import Control.... | beni55/haste-compiler | libraries/time/lib/Data/Time/Clock/POSIX.hs | bsd-3-clause | 1,349 | 2 | 10 | 183 | 276 | 155 | 121 | 24 | 1 |
module B3 (myFringe) where
import D3 hiding (sumSquares)
import qualified D3
instance Same Float
where
isSame a b = a == b
isNotSame a b = a /= b
myFringe :: (Tree a) -> [a]
myFringe (Leaf x) = [x]
myFringe (Branch left right) = myFringe right
sumSquares ((x : xs)) = (x ^ 2) + (sumSquares xs)
sumSqu... | SAdams601/HaRe | old/testing/renaming/B3_AstOut.hs | bsd-3-clause | 333 | 0 | 8 | 83 | 157 | 85 | 72 | 11 | 1 |
-- Written by Bertram Felgenhauer
--
-- https://ghc.haskell.org/trac/ghc/ticket/11760#comment:14
--
-- Compile with -threaded -with-rtsopts=-N2
{-# LANGUAGE BangPatterns #-}
import Control.Concurrent
import Control.Monad
import Control.Monad.ST.Lazy
import Control.Exception
import Data.STRef
import Data.IORef
import C... | ezyang/ghc | libraries/base/tests/T11760.hs | bsd-3-clause | 1,375 | 0 | 18 | 407 | 467 | 218 | 249 | 41 | 2 |
{-# LANGUAGE GHCForeignImportPrim, UnliftedFFITypes, MagicHash #-}
module Lib where
import GHC.Prim
foreign import prim f1 :: Int# -> Int#
| olsner/ghc | testsuite/tests/codeGen/should_compile/T12355.hs | bsd-3-clause | 142 | 0 | 6 | 22 | 24 | 15 | 9 | -1 | -1 |
module Main where
import Control.Monad
import Data.List
import qualified Data.IntMap as IntMap
import Data.IntMap ( IntMap )
main :: IO ()
main =
do print (runSim initialState)
print (runSim initialState { difficulty = 1 })
runSim :: GameState -> Int
runSim s = search (IntMap.singleton 0 [s]) maxBound
data S... | glguy/advent2015 | Day22.hs | isc | 4,229 | 0 | 15 | 1,223 | 1,300 | 694 | 606 | 119 | 5 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeFamilies #-}
-- | Expand allocations inside of maps when possible.
module Futhark.Pass.ExpandAllocations (expandAllocations) where
import Control.Monad.Except
import Control.Monad.Reader
import Control.Monad.State
import Co... | diku-dk/futhark | src/Futhark/Pass/ExpandAllocations.hs | isc | 30,085 | 0 | 21 | 7,148 | 9,265 | 4,644 | 4,621 | -1 | -1 |
module Main where
import Data.List.Split
import Data.List
import System.IO
import System.Exit
import System.Environment
main :: IO ()
main = getArgs >>= go
go ["-h" ] = help
go ["--help"] = help
go ("--" :xs) = go' xs
go xs = go' xs
go' [] = interact (process "," ",")
go' [i] = interact (proce... | sordina/transpose | src/Main.hs | mit | 556 | 0 | 11 | 129 | 232 | 120 | 112 | 18 | 1 |
module Lights where
import Data.Vect.Float.Base
import Types
data Light
= PointLight Vec3 Color Attenuation
| DirectionalLight Vec3 Color
deriving Show
colorOf :: Light -> Color
colorOf (PointLight _ color _) = color
colorOf (DirectionalLight _ color) = color
buildPointLight :: Vec3 -> Color -> Attenuation -> L... | CanisLupus/haskell-raytracer | Lights.hs | mit | 1,132 | 6 | 9 | 177 | 360 | 187 | 173 | 24 | 1 |
{-# htermination eltsFM_LE :: (Ord a, Ord k) => FiniteMap (a,k) b -> (a,k) -> [b] #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_eltsFM_LE_12.hs | mit | 103 | 0 | 3 | 19 | 5 | 3 | 2 | 1 | 0 |
-------------------------------------------------------------------------
-- Copyright (c) 2007-2011, 2012 ETH Zurich.
-- All rights reserved.
--
-- This file is distributed under the terms in the attached LICENSE file.
-- If you do not find this file, copies can be found by writing to:-
-- ETH Zurich D-INFK CAB F.78, ... | joe9/barrelfish | hake/RuleDefs.hs | mit | 44,692 | 0 | 18 | 11,775 | 12,007 | 6,191 | 5,816 | 728 | 3 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
import GHC.Generics
import System.Environment (getArgs)
import Data.Aeson hiding (encode)
import Data.Yaml
import Data.List
import System.Directory (doesFileExist, findExecutable, getCurrentDirectory, getHomeDirect... | gilligan/hoobuddy | src/Main.hs | mit | 4,463 | 0 | 13 | 996 | 1,001 | 515 | 486 | 85 | 5 |
-- Collects the Hackage dependency tree for a package.
-- I feel like it would be better to handle lookup failures core data
-- structure instead of ignoring them. However I'm going to defer that change
-- for now. This approach should work well enough for a first draft.
-- TODO Is there an alternative to classyPrelu... | bsummer4/depviz | DepViz.hs | mit | 3,021 | 0 | 15 | 673 | 821 | 454 | 367 | 54 | 2 |
{-
pandoc-crossref is a pandoc filter for numbering figures,
equations, tables and cross-references to them.
Copyright (C) 2015 Nikolay Yakimov <root@livid.pp.ru>
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... | lierdakil/pandoc-crossref | lib-internal/Text/Pandoc/CrossRef/References/Types.hs | gpl-2.0 | 1,864 | 0 | 9 | 512 | 242 | 146 | 96 | 26 | 0 |
module NFA.Epsilon.Un where
import qualified NFA.Epsilon.Data as E
import Autolib.NFA
import Autolib.NFA.Epsilon
import qualified Autolib.Relation
-- | the real part of the automaton (all non-eps transitions)
real :: NFAC c s => E.ENFA c s -> NFA c s
real e = NFA
{ nfa_info = funni "Un.real" [ E.nfa_info e... | marcellussiegburg/autotool | collection/src/NFA/Epsilon/Un.hs | gpl-2.0 | 720 | 0 | 10 | 246 | 212 | 114 | 98 | 16 | 1 |
module REPL where
import System.Console.Haskeline
import Types
import Evaluator
import Control.Monad.Trans
runRepl :: IO ()
runRepl = do
putStrLn "Welcome to the scheme REPL!"
env <- primitiveBindings
runInputT defaultSettings (loop env)
where loop :: Env -> InputT IO ()
loop env = do
ln <... | 5outh/wyas | REPL.hs | gpl-2.0 | 659 | 0 | 16 | 246 | 179 | 84 | 95 | 21 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
{- |
Module : ./RDF/Symbols.hs
Copyright : (c) Francisc-Nicolae Bungiu
License : GPLv2 or higher, see LICENSE.txt
Maintainer : f.bungiu@jacobs-university.de
Stability : provisional
Portability : portable
Symbol items for Hets
-}
module RDF.Symbols where
import... | spechub/Hets | RDF/Symbols.hs | gpl-2.0 | 755 | 0 | 9 | 141 | 161 | 90 | 71 | 13 | 0 |
module Language.Commands where
import Language.Expressions
import qualified Data.Map as M
import qualified System.Directory as D
builtinCmd =
M.fromList [
("cd", changeDir)
]
changeDir :: [String] -> IO ()
changeDir args = do
case null args of
True -> do
home <- D.getHomeDirectory
D.setC... | tomicm/puh-hash | Language/Commands.hs | gpl-2.0 | 388 | 0 | 13 | 86 | 119 | 64 | 55 | 14 | 2 |
{-# LANGUAGE ImportQualifiedPost #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RankNTypes #-}
import Control.Applicative(ZipList(..), Alternative ((<|>)))
import Control.Arrow((&&&))
import Control.Exception qualified as E
import Control.Monad(unless, when, forM_)
import Control.... | jvilar/hrows | src/Listing.hs | gpl-2.0 | 20,311 | 0 | 18 | 6,622 | 5,969 | 3,073 | 2,896 | -1 | -1 |
import Automata
import Text.Parsec
import Text.Parsec.String
import Text.Parsec.Expr
import Control.Applicative ((<$>))
dfaparser :: Parser DFA
nfaparser :: Parser NFA
| computation-hs/comp-models | ParseAutomata.hs | gpl-2.0 | 169 | 0 | 5 | 20 | 49 | 29 | 20 | 7 | 0 |
module Value(Value(Nil,Cons),isNil,car,cdr,strToValue,valueToStr) where
import Data.Bits(bit,testBit)
import Data.Char(chr,ord)
data Value = Nil | Cons Value Value
deriving (Eq, Ord)
instance Show Value where
show a = '(' : shows a ")" where
shows Nil s = s
shows (Cons a b) s = '(' : shows a ... | qpliu/esolang | ph/hs/interp/Value.hs | gpl-3.0 | 1,644 | 0 | 12 | 413 | 790 | 411 | 379 | 49 | 4 |
module Web.CookieJar.Parser.Util where
import qualified Data.ByteString as BS
import Web.CookieJar.Types
colon :: Word8
colon = 0x3A
semicolon :: Word8
semicolon = 0x3B
equals :: Word8
equals = 0x3D
space :: Word8
space = 0x20
hTab :: Word8
hTab = 0x09
slash :: Word8
slash = 0x2F
period :: Word8
period = 0x2E... | ktvoelker/cookie-jar | src/Web/CookieJar/Parser/Util.hs | gpl-3.0 | 1,073 | 0 | 11 | 268 | 416 | 225 | 191 | 40 | 3 |
module HLinear.NormalForm.FoldUnfold.ReduceEchelonForm.EuclideanDomain
where
import qualified Prelude as P
import HLinear.Utility.Prelude
import Data.Sequence ( ViewR(..), viewr )
import qualified Data.Sequence as S
import qualified Data.Vector as V
import qualified Data.Permute as P
import HLinear.Hook.ERHook ( ERH... | martinra/hlinear | src/HLinear/NormalForm/FoldUnfold/ReduceEchelonForm/EuclideanDomain.hs | gpl-3.0 | 2,347 | 0 | 17 | 543 | 751 | 420 | 331 | 52 | 2 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE Trustworthy #-}
{- |
Module : Data.Complex.Cyclotomic
Copyright : (c) Scott N. Walck 2012-2017
License : GPL-3 (see LICENSE)
Maintainer : Scott N. Walck <walck@lvc.edu>
Stability : experimental
The cyclotomic numbers are a subset of the complex numbers with
th... | walck/cyclotomic | src/Data/Complex/Cyclotomic.hs | gpl-3.0 | 18,916 | 0 | 15 | 5,384 | 5,831 | 3,039 | 2,792 | 374 | 4 |
{-# LANGUAGE OverloadedStrings, GADTs #-}
module Java2js.Load(loadKlass, withKlass, loadCPEntry, entry2Direct) where
--
import Data.ByteString.Lazy.Char8 (unpack)
import Java2js.Type
import Java2js.Mangle
import Java2js.Java.ClassPath
import Java2js.Java.JAR.Archive (readFromJAR)
import Java2js.JVM.Common ()
import Ja... | ledyba/java.js | lib/Java2js/Load.hs | gpl-3.0 | 2,231 | 14 | 12 | 347 | 854 | 448 | 406 | 48 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-route53-domains/gen/Network/AWS/Route53Domains/GetOperationDetail.hs | mpl-2.0 | 5,776 | 0 | 19 | 1,232 | 830 | 497 | 333 | 87 | 1 |
module Kata.AreWeAlternate (isAlt) where
isAlt :: String -> Bool
isAlt [ ] = True
isAlt (a : b) = f b $ isV a
where f (h : t) l = l /= isV h && (f t $ not l)
f [ ] l = True
isV = (`elem` "aeiou")
--
| ice1000/OI-codes | codewars/401-500/are-we-alternate.hs | agpl-3.0 | 227 | 0 | 10 | 80 | 122 | 65 | 57 | 7 | 2 |
module Main where
import Types.Cards
import Types.Lists
import Types.Trees
import Types.User
main :: IO ()
main = putStrLn "TypeLineTests compiled"
-- Testing Type Signature Insertion is a bit thin
-- As Blackbox doesn't really do much work in this for this at all
-- All that needs tested is the ability to extract ... | DarrenMowat/blackbox | tests/results/TypeLineTests.hs | unlicense | 1,048 | 0 | 7 | 231 | 252 | 136 | 116 | 20 | 1 |
module Handler.Synthax.Synthaxes
( getSynthaxesR
, postSynthaxesR
) where
import Handler.Partials
import Handler.Synthax.Partials
import Import
import Data.Time
import Yesod.Auth
getSynthaxesR :: Handler Html
getSynthaxesR = do
euser <- requireAuth
synthaxes <- runDB $ selectList [] [Desc SynthaxCreated]
... | burz/sonada | Handler/Synthax/Synthaxes.hs | apache-2.0 | 769 | 0 | 13 | 162 | 222 | 108 | 114 | -1 | -1 |
module Handler.Api
( postNewPlayerR
, postVoteR
, postMakePostR
, postMakeReplyR
) where
import Import
import Data.Aeson
import Control.Monad (mzero, when)
import Data.Time (getCurrentTime)
import Data.Maybe (isNothing)
data VoteReq = VoteReq Vote Name
instance FromJSON VoteReq where
parseJSO... | JerrySun/league-famous | Handler/Api.hs | bsd-2-clause | 2,729 | 0 | 13 | 844 | 857 | 420 | 437 | 71 | 3 |
{-# LANGUAGE OverloadedStrings #-}
-- |Executable that writes all 3D vertices found in all @PLY@ files
-- indicated by a @.conf@ file to a single binary file.
module Main (main) where
import Control.Monad (when)
import qualified Data.Vector.Storable as VS
import Linear.V3
import PLY
import System.Environment (getArgs)
... | acowley/ply-loader | src/executable/Main.hs | bsd-3-clause | 874 | 0 | 15 | 217 | 247 | 132 | 115 | 18 | 1 |
{-# LANGUAGE RecordWildCards #-}
-----------------------------------------------------------------------------
-- |
-- Module : Blip.Marshal
-- Copyright : (c) 2012, 2013 Bernie Pope
-- License : BSD-style
-- Maintainer : florbitous@gmail.com
-- Stability : experimental
-- Portability : ghc
--
-- Reading,... | bjpop/blip | bliplib/src/Blip/Marshal.hs | bsd-3-clause | 16,861 | 0 | 34 | 4,050 | 4,524 | 2,415 | 2,109 | 452 | 13 |
{-# LANGUAGE PatternGuards #-}
module Idris.DSL where
import Idris.AbsSyntax
import Paths_idris
import Core.CoreParser
import Core.TT
import Core.Evaluate
import Debug.Trace
desugar :: SyntaxInfo -> IState -> PTerm -> PTerm
desugar syn i t = let t' = expandDo (dsl_info syn) t in
t' -- addImpl... | christiaanb/Idris-dev | src/Idris/DSL.hs | bsd-3-clause | 4,736 | 0 | 17 | 1,612 | 2,439 | 1,194 | 1,245 | 98 | 19 |
module Types where
type ID = Int
type Name = String
type Description = String
type FirstAired = String
type Banner = String
type ImdbID = Int
type Rating = Float
type EpisodeNumber = Int
type SeasonNumber = Int
data Episode = Episode {
episodeID :: ID
, episodeName :: Name
, episo... | Tehnix/HsPVR | src/Types.hs | bsd-3-clause | 1,005 | 0 | 10 | 333 | 226 | 146 | 80 | 34 | 0 |
module Math.DyckWord.Binary.Internal where
import Control.Applicative ( (<$>) )
import Math.Combinatorics.Exact.Binomial
catalanTriangle :: Integer -> Integer -> Integer
catalanTriangle _ 0 = 1
catalanTriangle n k = (choose (n + k) (k - 1) * (n - k + 1)) `div` k
catalanSum :: Int -> Integer
catal... | johanneshilden/dyckword | src/Math/DyckWord/Binary/Internal.hs | bsd-3-clause | 524 | 0 | 10 | 118 | 236 | 133 | 103 | 13 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE PatternGuards #-}
-- |
-- Module : Data.Scientific
-- Copyright : Bas van Dijk 2013
-- License : BSD3
-- Maintainer : Bas van Dijk <v.d... | phadej/scientific | src/Data/Scientific.hs | bsd-3-clause | 34,902 | 21 | 19 | 9,882 | 7,104 | 3,815 | 3,289 | 483 | 12 |
module Util.Misc where
import Control.Monad (replicateM)
import qualified Data.ByteString as B
infinity :: Double
infinity = read "Infinity"
ninfinity :: Double
ninfinity = read "-Infinity"
replicateM' :: (Monad m, Integral i) => m a -> i -> m [a]
replicateM' m i = Control.Monad.replicateM (fromIntegral i... | phylake/haskell-util | Misc.hs | bsd-3-clause | 809 | 0 | 10 | 216 | 533 | 295 | 238 | 34 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE PackageImports #-}
import qualified Data.ByteString as B
import Data.ByteString.Char8 (pack)
import Data.Digest.SHA256 (hash)
import Data.LargeWord
import Data.Maybe (fromJust)
import qualif... | comatose/hecs | src/Main.hs | bsd-3-clause | 1,458 | 0 | 17 | 371 | 450 | 245 | 205 | 33 | 3 |
-- |
-- Module : Data.Functor.Product
-- Copyright : (c) Ross Paterson 2010
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : ross@soi.city.ac.uk
-- Stability : experimental
-- Portability : portable
--
-- Products, lifted to functors.
module Data.Functor.Product (
Product(..),
... | ekmett/transformers | Data/Functor/Product.hs | bsd-3-clause | 1,265 | 0 | 8 | 276 | 476 | 253 | 223 | 19 | 0 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
module Math.Budget.Lens.ZonedTimeL where
import Data.Time
class ZonedTimeL cat target | target -> cat where
zonedTimeL :: cat target ZonedTime
| tonymorris/hbudget | src/Math/Budget/Lens/ZonedTimeL.hs | bsd-3-clause | 211 | 0 | 7 | 29 | 41 | 24 | 17 | 5 | 0 |
{-# LANGUAGE LambdaCase #-}
module Main where
import System.Environment
import qualified System.IO.Strict as Strict
import Text.AsciiArt
data Mode
= Inplace FilePath
| Read FilePath
| Pipe
main :: IO ()
main = do
mode <- getArgs <&> \case
[] -> Pipe
["-i"... | fmthoma/ascii-art-to-unicode | app/Main.hs | bsd-3-clause | 1,451 | 0 | 14 | 581 | 353 | 179 | 174 | 38 | 8 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UnicodeSyntax #-}
{-|
[@ISO639-1@] -
[@ISO639-2B@] paa
[@ISO639-3@] hui
[@Native name@] -
[@English name@] Huli
-}
modul... | telser/numerals | src/Text/Numeral/Language/PAA.hs | bsd-3-clause | 3,356 | 6 | 14 | 1,163 | 753 | 452 | 301 | 69 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Guide.Session
(
newAcidSessionStore
)
where
import Imports
... | aelve/hslibs | src/Guide/Session.hs | bsd-3-clause | 3,390 | 0 | 16 | 637 | 541 | 273 | 268 | 45 | 1 |
module Main where
import System.IO
import XMonad
import XMonad.Util.EZConfig (additionalKeys)
import XMonad.Util.Run (spawnPipe)
import XMonad.Layout.NoBorders (smartBorders)
import XMonad.Layout.LayoutHints (layoutHints)
import XMonad.Hooks.DynamicLog (dynamicLogWithPP, PP(..))
import XMonad.Hooks.ManageDocks -- (av... | sshine/xsimonad | src/Xmonad.hs | bsd-3-clause | 1,174 | 0 | 13 | 310 | 266 | 152 | 114 | 28 | 1 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2015 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
{-# LANGUAGE RecordWildCards #-}
module Cryptol.Parser.NoInclude
( removeIncludesModule
, IncludeError(..), ppIncludeErr... | ntc2/cryptol | src/Cryptol/Parser/NoInclude.hs | bsd-3-clause | 6,066 | 0 | 16 | 1,367 | 1,662 | 850 | 812 | 118 | 3 |
-- An abstract data type for performing multiple linear regression,
-- using HMatrix as the backend for matrix computations.
--
-- types:
-- Matrix a (2D-array)
-- Vector a (vector from the standard vector package)
--
-- Both types are dense, immutable, and strict in all elements and are
-- manipulated as whole b... | markrgrant/regression | src/Regression/HMatrix.hs | bsd-3-clause | 9,482 | 0 | 15 | 2,233 | 2,244 | 1,236 | 1,008 | 136 | 2 |
module Main where
import Options.Applicative
import Plunge.Options
import Plunge.Parsers.PreprocessorOutput
import Plunge.Preprocessor
import Plunge.Analytics.C2CPP
import Plunge.Printers.Analytics
import Plunge.Types.PreprocessorOutput
main :: IO ()
main = execParser options >>= runWithOptions
runWithOptions :: Op... | sw17ch/plunge | src/Plunge.hs | bsd-3-clause | 1,275 | 0 | 12 | 257 | 398 | 198 | 200 | 32 | 2 |
{-# LANGUAGE PatternGuards, NoMonomorphismRestriction, CPP #-}
module Ant.Vector where
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Unboxed.Mutable as UM
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as VM
#ifndef DEBUG
indexU :: (U.Unbox a) => U.Vector a -> Int ... | Saulzar/Ants | Ant/Vector.hs | bsd-3-clause | 961 | 0 | 8 | 174 | 140 | 89 | 51 | 20 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Database.HMDX.Info
( createDB
) where
import Database.HMDX.SSAS ( defaultSettings
, catalogName
, cubeName
, mdSchemaDimensions)
import BasicP... | sfilipov/hmdx | src/Database/HMDX/Info.hs | mit | 2,915 | 0 | 15 | 693 | 868 | 457 | 411 | 69 | 1 |
--
--
--
------------------
-- Exercise 11.18.
------------------
--
--
--
module E'11'18 where
curryList :: ([a] -> d) -> (a -> [a] -> d)
curryList function
= \item remainingItems -> function (item : remainingItems) -- Partial anonymous function application.
{- GHCi>
curryList sum 1 [2]
-}
-- 3
uncurryL... | pascal-knodel/haskell-craft | _/links/E'11'18.hs | mit | 2,879 | 0 | 11 | 658 | 416 | 254 | 162 | 19 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Countdown.AttemptsSpecs (main, spec) where
import Test.Hspec
import Countdown.Game (Player (..), Challange (..), Attempt(..), attemptFromFormula)
-- `main` is here so that this module can be run from GHCi on its own. It is
-- not needed for automatic spec discovery.
main ::... | CarstenKoenig/Countdown | test/Countdown/AttemptsSpecs.hs | mit | 3,986 | 0 | 17 | 1,008 | 860 | 407 | 453 | 77 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{- |
Module : $Header$
Description : abstract CSMOF syntax
Copyright : (c) Daniel Calegari Universidad de la Republica, Uruguay 2013
License : GPLv2 or higher, see LICENSE.txt
Maintainer : dcalegar@fing.edu.uy
Stability : provisional
Portability : portable
-}
m... | keithodulaigh/Hets | CSMOF/As.hs | gpl-2.0 | 4,554 | 0 | 9 | 1,448 | 985 | 553 | 432 | 102 | 0 |
-- This file is part of HamSql
--
-- Copyright 2016 by it's authors.
-- Some rights reserved. See COPYING, AUTHORS.
{-# LANGUAGE FlexibleInstances #-}
module Database.HamSql.Internal.Stmt.Function where
import Data.Maybe
import qualified Data.Text as T
import Database.HamSql.Internal.Stmt.Basic
stmtsDropFunction' :... | hemio-ev/hamsql | src/Database/HamSql/Internal/Stmt/Function.hs | gpl-3.0 | 3,951 | 0 | 20 | 1,045 | 959 | 482 | 477 | 79 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module View.Add (render) where
import Text.Blaze.Html5.Attributes (action, method, name, type_, class_)
import Text.Blaze.Html.Renderer.Text
import View.Header
import qualified Data.Text.Lazy as D
import qualified Text.Blaze.Html5 as H
-- |
--
-- >>> render
-- "<!DOCTYPE HTML>\n<h... | codemiller/pirate-gold | src/View/Add.hs | apache-2.0 | 1,057 | 0 | 17 | 163 | 233 | 123 | 110 | 18 | 1 |
-- Add two numbers:
add :: Int -> Int -> Int
add x y = x + y
-- Call a function three times:
tick :: (Int -> Int) -> [Int]
tick f = [f 1, f 2, f 3]
-- Prints "[11,12,13]"
main = print (tick (add 10))
| rm-training/advanced-js | examples/partial.hs | bsd-2-clause | 202 | 0 | 9 | 51 | 96 | 51 | 45 | 5 | 1 |
-- From http://lpaste.net/81623, courtesy of Albert Y. C. Lai
main = do
print 3
if True then do
print 5
else print 7
| mpickering/ghc-exactprint | tests/examples/ghc710/IfThenElse3.hs | bsd-3-clause | 129 | 0 | 10 | 35 | 33 | 15 | 18 | 5 | 2 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2014 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
--
-- This module contains types used during type inference.
{-# LANGUAGE Safe #-}
{-# LANGUAGE FlexibleInstances, FlexibleCo... | TomMD/cryptol | src/Cryptol/TypeCheck/InferTypes.hs | bsd-3-clause | 17,735 | 0 | 19 | 6,026 | 4,285 | 2,140 | 2,145 | 352 | 7 |
{-# LANGUAGE CPP, DeriveDataTypeable #-}
{-# OPTIONS -Wall #-}
-- | An 'Annotation' that lets you call __syncthreads() before
-- or after a statement.
module Language.Paraiso.Annotation.SyncThreads (
Timing(..)
) where
import Data.Dynamic
import Language.Paraiso.Prelude
data Timing = Pre | Post
deriving (E... | nushio3/Paraiso | Language/Paraiso/Annotation/SyncThreads.hs | bsd-3-clause | 338 | 0 | 6 | 57 | 57 | 37 | 20 | 8 | 0 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
module Network.Wai.Handler.Warp.HTTP2.Worker (
Responder
, response
, worker
) where
#if __GLASGOW_HASKELL__ < 709
import ... | utdemir/wai | warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs | mit | 9,293 | 0 | 23 | 2,500 | 2,101 | 1,039 | 1,062 | 174 | 7 |
{-# LANGUAGE CPP #-}
#ifndef __GHCJS__
{-# LANGUAGE RankNTypes, TypeSynonymInstances, FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
#endif
module React.GHCJS
( currentDocument
, Document
, Element
, JSAny
, documentGetElementById
-- * GHCJS stubs
#ifdef __GHCJS__
, m... | silky/react-haskell | src/React/GHCJS.hs | mit | 2,850 | 0 | 6 | 648 | 130 | 89 | 41 | -1 | -1 |
data Either a b = Left a | Right b
-- class Functor f where
-- fmap :: (a -> b) -> f a -> f b
-- instance Functor [] where
-- fmap f [] = []
-- fmap f (x:xs) = (f x):(fmap f xs)
-- instance Functor ((,) a) where
-- fmap f (x, y) = (x, f y)
class C1 a where
quux :: a -> Int
class C1 a => C2 ... | themattchan/tandoori | input/class-inherit.hs | bsd-3-clause | 804 | 0 | 7 | 242 | 179 | 96 | 83 | -1 | -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="hr-HR">
<title>Automation Framework</title>
<maps>
<homeID>top</homeID>
<mapref locatio... | kingthorin/zap-extensions | addOns/automation/src/main/javahelp/org/zaproxy/addon/automation/resources/help_hr_HR/helpset_hr_HR.hs | apache-2.0 | 965 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
module LocalCommand
( localCommand, localCommand'
)
where
import Data.List (intercalate)
import Development.Shake (Action, CmdOption(..), CmdResult, command,
doesFileExist, liftIO, need)
import Development.Shake.FilePath ( (</>), (<.>), exe, searchPathSeparator,
... | erantapaa/haskell-platform | hptool/src/LocalCommand.hs | bsd-3-clause | 2,078 | 0 | 11 | 506 | 511 | 275 | 236 | 32 | 3 |
module Util.FilterInput (filterInput,readSystem) where
import Control.Monad (when)
import Data.List
import System
import System.IO
import System.Posix
import Text.Printf
import Util.Gen
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
filterInput :: String -> [String] -> Handle -> ... | hvr/jhc | src/Util/FilterInput.hs | mit | 1,545 | 0 | 14 | 401 | 494 | 241 | 253 | 36 | 1 |
module LiftOneLevel.A3 where
import LiftOneLevel.C3 (anotherFun)
import LiftOneLevel.D3 (sumSquares)
main = sumSquares [1..4] + anotherFun [1..4]
| RefactoringTools/HaRe | test/testdata/LiftOneLevel/A3.hs | bsd-3-clause | 150 | 0 | 7 | 20 | 51 | 29 | 22 | 4 | 1 |
module HasElem where
{-@ LIQUID "--no-termination" @-}
data L a = Nil | Cons a (L a)
{-@ measure hasElem @-}
hasElem :: Eq a => a -> L a -> Bool
hasElem x Nil = False
hasElem x (Cons y ys) = x == y || hasElem x ys
{-@ prop :: {v:Bool | Prop v <=> true} @-}
prop :: Bool
prop = hasElem 1 (Cons 1 Nil)
{-@ prop1 :: {v... | ssaavedra/liquidhaskell | tests/pos/HasElem.hs | bsd-3-clause | 477 | 0 | 8 | 114 | 155 | 83 | 72 | 11 | 1 |
module HAD.Y2014.M03.D03.Solution where
import GHC.Exts (sortWith)
-- | Sort a list of list of elements by the maximum of each list,
-- in ascending order
--
-- Point-free: easy and readable
-- Level: EASY
--
-- Examples:
-- >>> sortByMax [[1,10],[5,5]]
-- [[5,5],[1,10]]
-- >>> sortByMax []
-- []
--
-- sortByMax [[]... | weima/1HAD | exercises/HAD/Y2014/M03/D03/Solution.hs | mit | 448 | 0 | 8 | 80 | 69 | 47 | 22 | 4 | 1 |
module Foundation where
import Prelude
import Yesod
import Yesod.Static
import Yesod.Auth
import Yesod.Auth.BrowserId
import Yesod.Auth.GoogleEmail
import Yesod.Default.Config
import Yesod.Default.Util (addStaticContentExternal)
import Network.HTTP.Conduit (Manager)
import qualified Settings
import Settings.Developmen... | BJTerry/WebSockets-example | Foundation.hs | mit | 7,099 | 0 | 17 | 1,471 | 939 | 527 | 412 | -1 | -1 |
module Object
( Env, Params, Body, Obj(..)
, atom, eq, car, cdr, cons
) where
import qualified Data.Map as Map
data Env = Env { parent :: Maybe Env
, reftbl :: Map.Map Obj Obj} deriving (Show, Eq, Ord)
type Params = [Obj]
type Body = (Obj, [Obj])
data Obj = Number Int
| Bool Bool
| String String
... | sawaken/pure-lisp.hs | src/Object.hs | mit | 669 | 0 | 10 | 187 | 325 | 183 | 142 | 26 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.